try{}~catch{}で処理されなかった例外はPxキーで処理を行うことができます。
Pxキーはキーセット(_main)の一番最後に記載する方が良いです。
※エラー発生個所と同列にPxキーがある場合はPxキーが呼ばれません。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Kf(_px){ Pe{ /*キーステーションが最初に実行するキーセット*/ N(_main); } } K(_main){ U{ R(#row1){ C(#col1,"e.message?") C(#col2) } R(#row2){ C(#col1,"e.source?") C(#col2) } Pe{ /*存在しないキーに値を設定*/ #row3?="error"; } } Px((key)e){ #row1#col2?=e.message?; #row2#col2?=e.source?; } } |

px.ksf 0.39 KB
実行結果
