-
Notifications
You must be signed in to change notification settings - Fork 93
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
How to tell if hcl.assert_ fired programmatically? #413
Comments
Hmmmm... I'll see if I can enable the return value of the top function. If the return value is non-zero then the program is wrong. |
Yes, this is pretty much what I was envisioning. |
Please check #414. Now it is merged. |
I tried #414 and it indeed raises an exception. For example:
Output:
|
Right, ideally we want to return the error message. For now, it would take some extra work to implement that. I'll mark it as enhancement. |
hcl.assert_ terminates the LLVM execution when it fires. However, there doesn't seem to be any indication at the top-level that the hcl.assert_ fired. Can it raise an exception HCLAssert (for example) ?
The text was updated successfully, but these errors were encountered: