-
Notifications
You must be signed in to change notification settings - Fork 237
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
Error/Assertion wrapping #435
Comments
An interesting idea. I imagine we would show the whole "stack" of errors. How would a more realistic example look like? If it was limited to assertions, like in the example, we could get away with this without changing the semantics. It would just be a nice way to present errors (the intermediate assertions are already a part of the stack trace btw). |
Well, the problem right now, is that this doesn't actually seem to trigger the outer assert
|
Well, the outer assert shows up in the stack trace (the 1:54-59 part). It doesn't "trigger" per se, because there is an error while checking the condition. BTW you can use |
There are 3 use cases to consider:
With that in mind, I've thought for a while that a proper catch construct is probably better than addressing each case separately. |
Actually, since it's related. What's the difference between |
Object assertions are more than that and it causes a lot of trouble (e.g. google/jsonnet#451). |
I'd like to be able to do something like this, similar to how Go lets you wrap errors.
This is related to google/jsonnet#415
The text was updated successfully, but these errors were encountered: