私はそのようなコードを持っています:
try {
var a = arr[index];
}
catch (e:Error){
putErrorIntoSQLite(); // asynchronous DB access
FlexGlobals.topLevelApplication.close(); // closing the application
}
これは非同期 DB アクセスであり、アプリケーションを閉じる前にエラー メッセージを DB に挿入する時間がないのではないかと思います。
質問: これを防ぐ方法は? close() アクションを延期して DB イベントを待つ方法は?
これの代わりに
putErrorIntoSQLite(); // asynchronous DB access
[Bindable] 変数を使用します
bindableVar = "This is an error message";
イベントも使用しますか?