File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -477,25 +477,17 @@ public function getDisplay(): string
477477 $ context = 'danger ' ;
478478 }
479479
480- $ retval = '<div class="alert alert- ' . $ context . '" role="alert"> ' ;
481- if (! $ this ->isUserError ()) {
482- $ retval .= '<strong> ' . $ this ->getType () . '</strong> ' ;
483- $ retval .= ' in ' . $ this ->getFile () . '# ' . $ this ->getLine ();
484- $ retval .= "<br> \n" ;
485- }
486-
487- $ retval .= $ this ->getMessage ();
488- if (! $ this ->isUserError ()) {
489- $ retval .= "<br> \n" ;
490- $ retval .= "<br> \n" ;
491- $ retval .= "<strong>Backtrace</strong><br> \n" ;
492- $ retval .= "<br> \n" ;
493- $ retval .= $ this ->getBacktraceDisplay ();
494- }
495-
496- $ retval .= '</div> ' ;
497-
498- return $ retval ;
480+ $ template = new Template ();
481+
482+ return $ template ->render ('error/get_display ' ,[
483+ 'context ' => $ context ,
484+ 'isUserError ' => $ this ->isUserError (),
485+ 'type ' => $ this ->getType (),
486+ 'file ' => $ this ->getFile (),
487+ 'line ' => $ this ->getLine (),
488+ 'message ' => $ this ->getMessage (),
489+ 'backtraceDisplay ' => $ this ->getBacktraceDisplay (),
490+ ]);
499491 }
500492
501493 /**
Original file line number Diff line number Diff line change 1+ <div class =" alert alert-{{ context }}" role =" alert" >
2+
3+ {% if isUserError == false %}
4+ <strong >{{ type }}</strong > in {{ file ~' #' ~ line }} <br >
5+ {% endif %}
6+
7+ {{ message }}
8+
9+ {% if isUserError == false %}
10+ <br ><br >
11+ <strong >Backtrace</strong ><br >
12+ <br >
13+ {{ backtraceDisplay }}
14+ {% endif %}
15+
16+
17+ </div >
You can’t perform that action at this time.
0 commit comments