R
Size: a a a
R
EL
R
EL
EL
EL
try {
$result = $client->call();
} catch (Exception) {}EL
catch не сработаетEL
R
catch не сработаетEL
try{
$res1 = $client->call('func2');
$res2 = $client->call('func1');
} catch (Exception) {
// не сработает, так как запросы еще не отправились
}
$sum = $res1[0] + $res2[0]; <- exception вне catchEL
EL
EL
R
$trx = $client->newTrx();или
$res1 = $trx->call('func2');
$res2 = $trx->call('func1');
$trx->commit();
$client->newTrx(function($trx){
$res1 = $trx->call('func2');
$res2 = $trx->call('func1');
});EL
R
EL
$trx = $client->newTrx();или
$res1 = $trx->call('func2');
$res2 = $trx->call('func1');
$trx->commit();
$client->newTrx(function($trx){
$res1 = $trx->call('func2');
$res2 = $trx->call('func1');
});