*push-error-using-command* または *push-error-using-stack* に対する以前の呼び出しを終了するエラー処理関数。
サポートされているプラットフォーム: Windows および Mac OS
(*pop-error-mode*)
引数はありません。
タイプ: T
値 T が返されます。
*pop-error-mode* に対する呼び出しは、カスタム *error* ハンドラ関数を、以前定義した *error* ハンドラと置き換えた後に実行する必要があります。
次に、*pop-error-mode* 関数の使用例を示します。
(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 the command function instead of command-s
; in a 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*
)
サンプル コードをロードした後、コマンド プロンプトに対して (myutil "String") と入力し、エラー ハンドラを入力します。