This commit is contained in:
Parziphal 2013-10-18 20:20:29 -05:00
parent 49e2421171
commit 9d747d6d0d
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<?php
namespace Rails\ActionController\Exception;
class DoubleRenderException extends Rails\Exception\LogicException implements ExceptionInterface
class DoubleRenderException extends \Rails\Exception\LogicException implements ExceptionInterface
{
protected $title = 'Double Render Error';
}
}

View File

@ -203,8 +203,13 @@ class Connection
$block = $params;
}
$this->resource()->beginTransaction();
$block();
$this->resource()->commit();
try {
$block();
$this->resource()->commit();
} catch (\Exception $e) {
$this->resource()->rollBack();
throw $e;
}
}
public function resource()