File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
java/com/flowingcode/vaadin/addons/errorwindow
resources/META-INF/resources/frontend/flowingcode Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 2525import com .vaadin .flow .component .button .Button ;
2626import com .vaadin .flow .component .dependency .CssImport ;
2727import com .vaadin .flow .component .dialog .Dialog ;
28+ import com .vaadin .flow .component .html .Div ;
2829import com .vaadin .flow .component .icon .VaadinIcon ;
2930import com .vaadin .flow .component .orderedlayout .FlexComponent .Alignment ;
3031import com .vaadin .flow .component .orderedlayout .HorizontalLayout ;
3132import com .vaadin .flow .component .orderedlayout .VerticalLayout ;
32- import com .vaadin .flow .component .textfield .TextArea ;
3333import java .io .ByteArrayOutputStream ;
3434import java .io .PrintWriter ;
3535import java .util .UUID ;
@@ -190,14 +190,15 @@ private VerticalLayout createExceptionTraceLayout() {
190190 }
191191
192192 protected Component createStackTraceArea () {
193- final TextArea area = new TextArea ();
193+ final Div area = new Div ();
194+ area .setClassName ("stacktrace" );
194195 area .setWidthFull ();
195196 area .setHeight ("15em" );
196197 final ByteArrayOutputStream baos = new ByteArrayOutputStream ();
197198 final PrintWriter pw = new PrintWriter (baos );
198199 cause .printStackTrace (pw );
199200 pw .flush ();
200- area .setValue (baos .toString ());
201+ area .add (baos .toString ());
201202 return area ;
202203 }
203204
Original file line number Diff line number Diff line change 99 font-weight : 600 ;
1010 font-size : var (--lumo-font-size-l );
1111 margin-top : 1em ;
12- }
12+ }
13+
14+ [theme ~= "error-window" ] .stacktrace {
15+ white-space : pre;
16+ background : rgba (26 , 57 , 96 , 0.1 );
17+ overflow : auto;
18+ padding : 0.25em 0.625em ;
19+ border-radius : 4px ;
20+ font-weight : 600 ;
21+ margin : 4px 0 ;
22+ box-sizing : border-box;
23+ }
You can’t perform that action at this time.
0 commit comments