Skip to content
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

Raise errors on 'assert' #363

Open
wants to merge 1 commit into
base: cl-compatible
Choose a base branch
from

Conversation

Affonso-Gui
Copy link
Member

Always had some doubts regarding the euslisp assert function. When the assertation fails it just enters a new ass prompt without any relevant information.

This PR makes assert raise errors upon failure, printing the Call Stack and enabling dynamic evaluation on the error point.

1.eus$ (let ((a 10)) (assert (zerop a)))
Call Stack (max depth: 20):
  0: at (assert (zerop a))
  1: at (assert (zerop a))
  2: at (let ((a 10)) (assert (zerop a)))
  3: at #<compiled-code #X6030a58>
eus 0 error:  Assertation Error in (assert (zerop a))
2.E1-eus$ ,a
10

@Affonso-Gui
Copy link
Member Author

@k-okada @furushchev @mmurooka Accepting comments.

@Affonso-Gui Affonso-Gui changed the base branch from master to cl-compatible March 6, 2019 08:19
@Affonso-Gui
Copy link
Member Author

Changed base to cl-compatible for testing features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants