From: Jani Laakso Date: Thu, 7 Feb 2008 13:16:51 +0000 (+0000) Subject: Newbies can easily do bad code that throws exceptions but those are simply ignored... X-Git-Tag: 6.7.0.beta1~5091 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41f8ffbb8b7b11e741f01938a9b22ed7acf810a7;p=vaadin-framework.git 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 --- 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 setVariable to the terminal. The default * implementation sets the exceptions as ComponentErrors to - * the component that initiated the exception. + * the component that initiated the exception and prints stack trace to + * System.err. *

*

* 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;