We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db454a8 commit d954a00Copy full SHA for d954a00
src/Session.php
@@ -223,11 +223,16 @@ public function beginTransaction()
223
'tx_settings' => $transaction_settings,
224
]);
225
226
- $tx_id = $result->getTxMeta()->getId();
227
-
228
- $this->tx_id = $tx_id;
+ if ($result && method_exists($result, 'getTxMeta'))
+ {
+ $this->tx_id = $result->getTxMeta()->getId();
229
230
- return $tx_id;
+ return $this->tx_id;
231
+ }
232
+ else
233
234
+ throw new Exception('YDB failed to begin transaction');
235
236
}
237
238
/**
0 commit comments