(defmacro safe-eval
"This macro is used to execute any function inside try-catch block.
returns value or nil in case of Exception and prints debug info. "
[& forms]
`(try
~@forms
(catch Exception e#
(println "--------------")
(println "file :" *file* \newline)
(println "s-exp:" (quote ~@forms))
(println "src :" ~(meta &form))
(println "=>" (.getMessage e#)))))
"This macro is used to execute any function inside try-catch block.
returns value or nil in case of Exception and prints debug info. "
[& forms]
`(try
~@forms
(catch Exception e#
(println "--------------")
(println "file :" *file* \newline)
(println "s-exp:" (quote ~@forms))
(println "src :" ~(meta &form))
(println "=>" (.getMessage e#)))))
Комментариев нет:
Отправить комментарий