diff options
author | Jani Laakso <jani.laakso@itmill.com> | 2008-02-07 13:16:51 +0000 |
---|---|---|
committer | Jani Laakso <jani.laakso@itmill.com> | 2008-02-07 13:16:51 +0000 |
commit | 41f8ffbb8b7b11e741f01938a9b22ed7acf810a7 (patch) | |
tree | c1683fd6b24244235bfe7e1a742fa3a0df35e193 | |
parent | 79d11d91f016e6212c3b7c1de4917db08fff8aa4 (diff) | |
download | vaadin-framework-41f8ffbb8b7b11e741f01938a9b22ed7acf810a7.tar.gz vaadin-framework-41f8ffbb8b7b11e741f01938a9b22ed7acf810a7.zip |
Newbies can easily do bad code that throws exceptions but those are simply ignored on the server-side logs (System streams). We should print stack traces by default to System.err too, users may override this behaviour if required.
svn changeset:3729/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/Application.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/Application.java b/src/com/itmill/toolkit/Application.java index b9ba29e7e4..2dbca6560e 100644 --- a/src/com/itmill/toolkit/Application.java +++ b/src/com/itmill/toolkit/Application.java @@ -1017,7 +1017,8 @@ public abstract class Application implements URIHandler, Terminal.ErrorListener * Invoked by the terminal on any exception that occurs in application and * is thrown by the <code>setVariable</code> to the terminal. The default * implementation sets the exceptions as <code>ComponentErrors</code> to - * the component that initiated the exception. + * the component that initiated the exception and prints stack trace to + * System.err. * </p> * <p> * You can safely override this method in your application in order to @@ -1029,6 +1030,8 @@ public abstract class Application implements URIHandler, Terminal.ErrorListener * @see com.itmill.toolkit.terminal.Terminal.ErrorListener#terminalError(com.itmill.toolkit.terminal.Terminal.ErrorEvent) */ public void terminalError(Terminal.ErrorEvent event) { + // throw it to System.err too + event.getThrowable().printStackTrace(); // Finds the original source of the error/exception Object owner = null; |