diff options
author | Marko Gronroos <magi@vaadin.com> | 2016-02-11 19:48:45 +0200 |
---|---|---|
committer | Marko Grönroos <magi@vaadin.com> | 2016-02-22 14:44:58 +0000 |
commit | 0dee5602cacb46e1120bc2339464c89bea34ddaa (patch) | |
tree | b05c8b300048054f00cfb4faf318e3e1e05abe53 /documentation/application/application-errors.asciidoc | |
parent | 4a4d1532cd2a844051301cc0d8b23a80fa011fd7 (diff) | |
download | vaadin-framework-0dee5602cacb46e1120bc2339464c89bea34ddaa.tar.gz vaadin-framework-0dee5602cacb46e1120bc2339464c89bea34ddaa.zip |
Fixed critically broken comment blocks, broken emphasis and escaping, and some other formatting, and moved book preface, chapter structure, and index to the docs repository.
Change-Id: If9299da4415f3181d59b8384e5ac96f940bd5229
Diffstat (limited to 'documentation/application/application-errors.asciidoc')
-rw-r--r-- | documentation/application/application-errors.asciidoc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/documentation/application/application-errors.asciidoc b/documentation/application/application-errors.asciidoc index 22f962a07c..f1406191bb 100644 --- a/documentation/application/application-errors.asciidoc +++ b/documentation/application/application-errors.asciidoc @@ -29,7 +29,7 @@ The result is shown in <<figure.application.errors.error-indicator>>. [[figure.application.errors.error-indicator]] .Error Indicator Active -image::img/errorindicator-example2.png[] +image::img/errorindicator-example2.png[scaledwidth=40%] [[application.errors.reconnect]] == Connection Fault @@ -101,7 +101,7 @@ as follows: ---- getService().setSystemMessagesProvider( new SystemMessagesProvider() { - @Override + @Override public SystemMessages getSystemMessages( SystemMessagesInfo systemMessagesInfo) { CustomizedSystemMessages messages = @@ -124,7 +124,7 @@ endif::web[] ifdef::web[] [[application.errors.unchecked-exceptions]] -== Handling Uncaught Exceptions +== Handling Uncaught Exceptions Handling events can result in exceptions either in the application logic or in the framework itself, but some of them may not be caught properly by the @@ -150,7 +150,7 @@ behavior of the default handler. [source, java] ---- -// Here's some code that produces an uncaught exception +// Here's some code that produces an uncaught exception final VerticalLayout layout = new VerticalLayout(); final Button button = new Button("Click Me!", new Button.ClickListener() { @@ -170,13 +170,13 @@ UI.getCurrent().setErrorHandler(new DefaultErrorHandler() { t = t.getCause()) if (t.getCause() == null) // We're at final cause cause += t.getClass().getName() + "<br/>"; - + // Display the error message in a custom fashion layout.addComponent(new Label(cause, ContentMode.HTML)); - + // Do the default error handling (optional) doDefault(event); - } + } }); ---- @@ -191,6 +191,3 @@ thrown. See the source code of the implementation for more details. You can call error. If the error is not associated with a component, it returns null. endif::web[] - - - |