| Summary: | Improve error handling of runtime errors | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Beat Schwarzentrub <bsh> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | gmalary, ickefickedicke, ronald.so, zimmermann |
| Version: | unspecified | ||
| Target Milestone: | 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Beat Schwarzentrub
Unfortunately, this didn't make it into 1.5. Will keep this bug high priority anyway, because I believe that not being able to customize these messages can be a blocker for productive deployment. On top of the great comments in this bug, there should be a way to avoid Java exception stack trace to show up in the UI when there is a runtime exception that is not being caught in the code. An ideal way is to forward the UI to a specific page (or pop a dialog box), show users with a customizable message and suppress the Java exception stack trace. Not sure if I need to file an additional bug but let me know if you want me to log this comment as a separate enhancement request. I hate when I did this. I found out right after my comment that ApplicationWorkbenchAdvisor.eventLoopException() handles the runtime exception. I assume I can code my way to show an error page and suppress the exception stack trace from the UI. Sorry for the false alarm. To provide more flexibility for deployments with container-based authentication, I think we should indeed support custom error handlers. For example, when using Form-Authentication in RAP, the container would intercept Ajax requests and return a custom error JSON (see bug 390711). A "session timeout" / "authentication required" error could be handled by the client in different ways, depending on the setup, e.g. * the client could display a dialog with a reload link * the client could reload the page, automatically following the redirect to a login page * the client could display a login form itself and send the credentials to j_security_check ... As a first step, the error messages have been made translatable. The default texts reside in the message bundle org/eclipse/rap/rwt/internal/RWTMessages.properties in the rwt bundle. Localized message bundles (RWTMessages_xx.properties can be included in a deployment, e.g. in an OSGi fragment. When the RWT locale changes (RWT.setLocale()), the translated error messages on the client are now updated correctly. What about renaming and moving the message bundle to a public place, e.g. org/eclipse/rap/rwt/client/WebClientMessages.properties? We agreed to keep the WebClientMessages.properties file at the current location. Theming support of the message box is requested by bug 342140. I'm closing this bug now. If there's still interest in exchangeable error handlers, please open a new enhancement request. Alternatively, you could simply overwrite the related ErrorHandler.js method in a custom JavaScript. |