When ActiveX methods fail, they raise exceptions rather than returning error values that your program can interpret.
If your program uses ActiveX methods, you must prepare it to catch exceptions, otherwise the program halts, leaving the user at an AutoCAD Command prompt. You can use vl-catch-all-apply to intercept errors returned by ActiveX methods.