Conditions | 5 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | protected static function getDebug(Exception $e, $depth = -1) |
||
34 | { |
||
35 | $errorDebugMsg = sprintf ( |
||
36 | "ERROR CODE:%d\nERROR FILE:%s\nERROR MESSAGE:%sERROR TRACE:%s", |
||
37 | $e->getCode (), |
||
38 | $e->getFile (), |
||
39 | $e->getMessage (), |
||
40 | $e->getTraceAsString () |
||
41 | ); |
||
42 | |||
43 | if( ($depth ==-1 || $depth >0 ) && $e->getPrevious() instanceof Exception){ |
||
44 | $depth -= $depth>0?1:0; |
||
45 | $errorDebugMsg = sprintf ('%s\n\nPRIVIOUS ERROR:\n', static::getDebug ($e->getPrevious())); |
||
46 | } |
||
47 | |||
48 | return $errorDebugMsg; |
||
49 | } |
||
50 | |||
56 |