Code: Select all
(defun func1 (param)
(eval (read-from-string param)))
Code: Select all
(defun func2 (param)
(handler-case
(eval (read-from-string param))
(error () "error")))
I wondered if there is some way to access properties of the error so I can display something to the caller like "division by zero" or "invalid number of arguments" or something like that. I did some googling but the examples I found are only for creating custom conditions and catching them - but in this case I may have a standard error.