File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace mindplay \testies ;
4
4
5
+ use Error ;
5
6
use PHP_CodeCoverage ;
6
7
use PHP_CodeCoverage_Report_Text ;
7
8
use PHP_CodeCoverage_Report_Clover ;
@@ -155,6 +156,10 @@ public function run()
155
156
} catch (Exception $ e ) {
156
157
$ this ->printResult (false , "UNEXPECTED EXCEPTION " , $ e );
157
158
159
+ $ thrown = $ e ;
160
+ } catch (Error $ e ) {
161
+ $ this ->printResult (false , "UNEXPECTED EXCEPTION " , $ e );
162
+
158
163
$ thrown = $ e ;
159
164
}
160
165
@@ -270,7 +275,7 @@ public function printSummary()
270
275
*/
271
276
public function format ($ value , $ detailed = false )
272
277
{
273
- if ($ value instanceof Exception) {
278
+ if ($ value instanceof Exception || $ value instanceof Error ) {
274
279
return $ detailed
275
280
? get_class ($ value ) . ": \n\"" . $ value ->getMessage () . "\"\n\nStacktrace: \n" . $ value ->getTraceAsString ()
276
281
: get_class ($ value ) . ": \n\"" . $ value ->getMessage () . "\"" ;
You can’t perform that action at this time.
0 commit comments