File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -81,22 +81,12 @@ public function handle(ServerRequestInterface $request)
81
81
// headers_sent() returns true if any unbuffered output reaches cgi stdout.
82
82
ob_start ();
83
83
84
- try {
85
- if ($ this ->bootstrap instanceof HooksInterface) {
86
- $ this ->bootstrap ->preHandle ($ this ->application );
87
- }
88
-
89
- $ syResponse = $ this ->application ->handle ($ syRequest );
90
- } catch (\Exception $ exception ) {
91
- // internal server error
92
- error_log ((string )$ exception );
93
- $ response = new Psr7 \Response (500 , ['Content-type ' => 'text/plain ' ], 'Unexpected error ' );
94
-
95
- // end buffering if we need to throw
96
- @ob_end_clean ();
97
- return $ response ;
84
+ if ($ this ->bootstrap instanceof HooksInterface) {
85
+ $ this ->bootstrap ->preHandle ($ this ->application );
98
86
}
99
87
88
+ $ syResponse = $ this ->application ->handle ($ syRequest );
89
+
100
90
$ out = ob_get_clean ();
101
91
$ response = $ this ->mapResponse ($ syResponse , $ out );
102
92
You can’t perform that action at this time.
0 commit comments