mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 21:47:32 -05: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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user