Author: chatellier Date: 2011-04-21 12:52:29 +0000 (Thu, 21 Apr 2011) New Revision: 3277 Log: N'affiche pas de popup quand c'est un NumberFormatException Modified: isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/IsisFish.java Modified: isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/IsisFish.java =================================================================== --- isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/IsisFish.java 2011-04-20 15:36:48 UTC (rev 3276) +++ isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/IsisFish.java 2011-04-21 12:52:29 UTC (rev 3277) @@ -607,7 +607,16 @@ if (log.isErrorEnabled()) { log.error("Global application exception", cause); } - ErrorHelper.showErrorDialog(null, cause.getMessage(), cause); + + // les NumberFormatException sont courantes lors de la saisie + // ca va etre relou de toutes les afficher + Throwable lastCause = cause; + while (lastCause.getCause() != null) { + lastCause = lastCause.getCause(); + } + if (!(lastCause instanceof NumberFormatException)) { + ErrorHelper.showErrorDialog(null, cause.getMessage(), cause); + } } } });