public void handleException(Throwable ex, Window window) {
		if (ex instanceof YMethodNotFoundException) {
			logger.info(ex.getMessage());
		} else if (ex instanceof YInvalidMVCNameException ||
					ex instanceof YCloneModelException ||
					ex instanceof YEqualsModelException ||
					ex instanceof YComponentValidationException) {
			logger.warn(ex.getMessage());
		} else {
			if (ex instanceof YComponentModelCopyException) {
				YComponentModelCopyException copyEx = (YComponentModelCopyException) ex;
				logger.error(ex.getMessage());
				logger.error("Original exception: ", copyEx.getOriginalException());
			} else {
				logger.error("Unknown error", ex);
			}
			// kommentoitu pois, koska esim. YTextFormatterin
			// nostaman poikkeuksen n�ytt�minen virheikkunassa saa aikaan ikisilmukan...
//			Window window = YUIToolkit.getCurrentWindow();
//			JOptionPane.showOptionDialog(
//				window,
//				"Unknown application error.",
//                "Error",
//                JOptionPane.DEFAULT_OPTION,
//                JOptionPane.ERROR_MESSAGE,
//                null,
//                new String[] {"Ok"},
//                "Ok");
		}
	}