Skip to content

Commit 587b130

Browse files
committed
Throw with runtime_err
1 parent 80457ea commit 587b130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

state_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ cxx_divide(lutok::state& state)
158158
if (divisor == 0)
159159
throw std::runtime_error("Divisor is 0");
160160
if (dividend < 0 || divisor < 0)
161-
throw std::string("Cannot divide negative numbers");
161+
throw std::runtime_error("Cannot divide negative numbers");
162162
state.push_integer(dividend / divisor);
163163
state.push_integer(dividend % divisor);
164164
return 2;

0 commit comments

Comments
 (0)