タグ

2010年11月22日のブックマーク (1件)

  • Prog4のエラーハンドリング | _level0 - KAYAC Front Engineer Blog

    Progression4になって、Commandのエラー処理のしかたが微妙にかわりました。 CommandクラスのcatchErrorというプロパティにエラー処理をする関数を設定します。引数はエラーが発生したCommandインスタンスと、発生したエラーとなります。以前のerrorメソッドは廃止されました。 一般的な書き方 var command:Command = new LoadURL( url ); command.catchError=function( target:Command, err:Error ):void { // ここで何かエラー処理 target.executeComplete(); } command.execute(); このように、エラー内容に応じて処理することができます。エラーが解決した場合は、エラーが発生したCommandインスタンスのexecuteCom

    Prog4のエラーハンドリング | _level0 - KAYAC Front Engineer Blog
    yukee
    yukee 2010/11/22
    コマンドエラー