Skip to content

Commit 4b05253

Browse files
committed
Throw with runtime_err
1 parent 5752d8b commit 4b05253

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)