rodrigo_sjc_sp Posted October 5, 2012 Posted October 5, 2012 How to create in Visual Lisp an ON ERROR RESUME NEXT a specific block in C# i use try { COMMAND ERRO } catch { // GO AHEAD , DONT BREAK } Thanks Rodrigo Quote
Lee Mac Posted October 5, 2012 Posted October 5, 2012 Look into using vl-catch-all-apply Please remember to use code tags... [highlight][noparse] [/noparse][/highlight] Your code here [highlight][noparse] [/noparse][/highlight] Quote
rodrigo_sjc_sp Posted October 5, 2012 Author Posted October 5, 2012 Sorry, thought it was only for use in large codes, I will do next time. Do you have a simple example of vl-catch-all-apply ? The examples I found on google are as difficult to understand much. Thanks Rodrigo Quote
Lee Mac Posted October 5, 2012 Posted October 5, 2012 Silly example: (defun c:test ( / num result ) (if (setq num (getint "\nChoose a number... just not zero: ")) (progn (if (vl-catch-all-error-p (setq result (vl-catch-all-apply '/ (list 10.0 num)))) (princ "\nI told you not to choose zero!") (princ (strcat "\n10 / " (itoa num) " = " (rtos result 2))) ) ) ) (princ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.