INTERNAL error in FAIL/message lost, reset to top
오토캐드 2015 부터 리습구문 내의 에러구문에 대한 규칙을 매우 엄격하게 적용하고 있는 듯 합니다.
리습 중간에 취소를 하게 되면 에러메세지를 내긴 하나, 그 뒤로도 도면을 그리거나 하는 것은 전혀 문제가 없는데.
2015 버전부터는 이 것을 허용하지 않고 있는 듯 합니다.
에러 구문 내에서 command-s 를 쓰지 않고, command 를 사용할 경우,
본문 앞과 뒤에 아래와 같은 표현을 해야 합니다.
------------------------------------------------
(defun my_err (err_msg)
(if (/= err_msg "Function cancelled")
(prompt (strcat "\nError: " err_msg))
)
(command "._undo" "_e")
(command "._U")
(setq *error* olderr)
(princ)
)
(defun myUtil (key / )
(setq olderr *error*
*error* my_err)
(*push-error-using-command*) ; Indicate use of Command function instead of Command-s
; in the custom error handler
(command "._undo" "_group") ; The following will not be executed in this sample, but is good
; framework for setting up your own error handlers
(/ 1 0) ; Call a function with incorrect values to trigger the custom error handler
; Remove when setting up your code
;; Perform your tasks here
(command "._undo" "_e")
(setq *error* olderr) ; Restore old *error* handler
(*pop-error-mode*) ; End the use of *push-error-using-command*
)
------------------------------------------------
그러나, 에러구문 안에 command가 없는데, 이 구문을 사용하면.. 명령어 중간에 취소시
"처리할 수 없는 예외 상황" 이라는 경고가 뜨고, 명령어 창에는 아래와 같은 메세지가 보입니다.
INTERNAL error in FAIL/message lost, reset to top
가 나오면서, 다시 화면으로 돌아가기는 하나, 후 작업시 다운되어 버리는 현상이 있습니다.
에러 구문을 작성할 때, 주의해야 할 부분입니다.