- TRAP
+TRAP
- TRAP <LOCAL|SYSTEM>
+TRAP <LOCAL|SYSTEM>
- Type: statement
+Type: statement
- Sets the runtime error trapping. By default, BaCon performs error
- trapping (LOCAL). BaCon tries to examine statements and functions where
- possible, and will display an error message based on the operating
- system internals, indicating which statement or function causes a
- problem. Optionally, when a CATCH is set, BaCon can jump to a LABEL
- instead, where a self-defined error function can be executed, and from
- where a RESUME is possible.
+ランタイムエラーのトラップ設定をします。
- When set to SYSTEM, error trapping is performed by the operating system.
- This means that if an error occurs, a signal will be caught by the
- program and a generic error message is displayed on the prompt. The
- program will then exit gracefully
-
- The setting LOCAL decreases the performance of the program, because
- additional runtime checks are carried out when the program is executed.
+TRAP LOCAL の場合、BaCon は内部でエラー動作を行います。(デフォルト)
+エラーが発生した場合、どこでエラーが発生したかを表示します。
+CATCH を使用した場合、BaCon は LABEL の場所へ飛び、エラー処理を行います。
+RESUME で実行を再開する事も可能です。
+TRAP SYSTEM の場合、エラーを OS へ返します。
+この場合エラーを実行されたプログラムで処理したり、
+エラーメッセージを得る事ができます。プログラム実行は終了します。