如果我的資料存盤事務失敗并且我還有一些應該在它完成后運行的代碼會發生什么?應用程式是否拋出錯誤并在那里結束?我的第二個代碼塊會運行還是永遠不會到達?
ofy().transact(new Runnable() {
@Override
public void run() {
// Some code here.
}
});
// Some more datastore code here. Will this be reached if the transact fails?
uj5u.com熱心網友回復:
如果交易失敗,您將收到例外。如果您不處理例外,它將傳播。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/481997.html
