-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any kind of run-time exception causes the REPL to exit #814
Comments
It looks like
We should fix all of these. |
It looks like the problem is much more general than I had realized. As it turns out, any failing computation in saw-script will cause the REPL to exit. For example, division by 0:
The saw-script/intTests/test_llvm_sizeof/test.saw Lines 19 to 21 in 3fce7d1
Any REPL command that causes the kind of failure that can be caught by |
I found a nice easy example to test the REPL error handling: the
In recent versions of So I did a
|
The saw-script stack-trace mechanism works by putting an exception handler around every function call: Each handler catches an IO exception, then throws a new one with some additional location information attached to it. Before 7dab9d5, it would always rethrow an |
eval_size
crashes on inf
or non-numeric types
If the argument to
eval_size
(which is a saw-script value of typeType
) does not evaluate to a finite numeric type, then it crashes the REPL:We should make it throw a catchable run-time error, so the REPL can handle it more gracefully.
The text was updated successfully, but these errors were encountered: