File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
src/DebugBar/DataCollector Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,26 @@ public function formatExceptionData(Exception $e)
113113 return $ this ->formatThrowableData ($ e );
114114 }
115115
116+ /**
117+ * Returns Throwable trace as an formated array
118+ *
119+ * @return array
120+ */
121+ public function formatTrace (array $ trace )
122+ {
123+ return $ trace ;
124+ }
125+
126+ /**
127+ * Returns Throwable data as an string
128+ *
129+ * @param \Throwable $e
130+ * @return string
131+ */
132+ public function formatTraceAsString ($ e )
133+ {
134+ return $ e ->getTraceAsString ();
135+ }
116136 /**
117137 * Returns Throwable data as an array
118138 *
@@ -132,7 +152,7 @@ public function formatThrowableData($e)
132152
133153 $ traceHtml = null ;
134154 if ($ this ->isHtmlVarDumperUsed ()) {
135- $ traceHtml = $ this ->getVarDumper ()->renderVar ($ e ->getTrace ());
155+ $ traceHtml = $ this ->getVarDumper ()->renderVar ($ this -> formatTrace ( $ e ->getTrace () ));
136156 }
137157
138158 return array (
@@ -141,7 +161,7 @@ public function formatThrowableData($e)
141161 'code ' => $ e ->getCode (),
142162 'file ' => $ this ->normalizeFilePath ($ filePath ),
143163 'line ' => $ e ->getLine (),
144- 'stack_trace ' => $ e -> getTraceAsString ( ),
164+ 'stack_trace ' => $ this -> formatTraceAsString ( $ e ),
145165 'stack_trace_html ' => $ traceHtml ,
146166 'surrounding_lines ' => $ lines ,
147167 'xdebug_link ' => $ this ->getXdebugLink ($ filePath , $ e ->getLine ())
You can’t perform that action at this time.
0 commit comments