Liferay Portelet eats all exceptions

Hi,

I develop Vaadin app as an liferay portlet. When exception occurs Liferay eats all exceptions - there is nothing in stacktrace or in GUI. Maybe it’s good after production deployment, but right now it makes my job harder, as I don’t now exactly where error occurred.

Any ideas how to make Liferay and Vaadin to print exceptions to stacktrace?

I think I found solution in
Book of Vaadin 4.7.4 Handling Errors

I added this method to my VaadinApplication class.


@Override
	public void terminalError(Terminal.ErrorEvent event) {
		// Call the default implementation.
		super.terminalError(event);

		// Some custom behaviour.
		StackTraceElement[] stackTrace = event.getThrowable().getStackTrace();
		StringBuilder sb = new StringBuilder();
		for (StackTraceElement each : stackTrace) {
			sb.append(each.toString() + "\n");
		}

		String exceptionMsg = sb.toString();
		log.error(exceptionMsg);
		if (getMainWindow() != null) {
			getMainWindow().showNotification("An unchecked exception occured!",
					Notification.TYPE_ERROR_MESSAGE);
		}
	}