mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
catches for live previews
This commit is contained in:
parent
00d535a8b4
commit
8210bce2bc
@ -290,10 +290,14 @@ class PreviewController extends BaseController
|
||||
return $maker->getCompiledHTML();
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
// nlog($e->getMessage());
|
||||
|
||||
DB::connection(config('database.default'))->rollBack();
|
||||
|
||||
return;
|
||||
if (DB::connection(config('database.default'))->transactionLevel() > 0) {
|
||||
DB::connection(config('database.default'))->rollBack();
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Error generating preview. Please retry again shortly.'], 400);
|
||||
}
|
||||
|
||||
//if phantom js...... inject here..
|
||||
|
Loading…
Reference in New Issue
Block a user