Skip to content

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