|
From: Walter M. <wal...@us...> - 2008-08-11 18:59:06
|
User: walterim
Date: 08/08/11 11:59:17
Modified: andromda-jsf2/src/main/resources/templates/jsf2/controllers/crud
Controller.java.vsl
Log:
Logging only unhandled exceptions.
Revision Changes Path
1.20 +24 -40 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/controllers/crud/Controller.java.vsl
Index: Controller.java.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/controllers/crud/Controller.java.vsl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -r1.19 -r1.20
--- Controller.java.vsl 29 Jul 2008 20:27:56 -0000 1.19
+++ Controller.java.vsl 11 Aug 2008 18:59:17 -0000 1.20
@@ -21,13 +21,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -84,13 +82,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -129,13 +125,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -164,13 +158,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -252,13 +244,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -327,13 +317,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -358,13 +346,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
@@ -447,13 +433,11 @@
catch (final Throwable throwable)
{
final String messageKey = ${managedBeansPackage}.${patternMatchingExceptionHandler}.instance().handleException(throwable);
- if(org.apache.commons.lang.StringUtils.isEmpty(messageKey)){
- throw throwable;
- } else {
+ // - the exception is re-thrown by the exception handler and handled by the catch below if it can't get a messageKey
+ // (no reason to check for presence of messageKey)
this.addErrorMessage(${managedBeansPackage}.Messages.get(messageKey, null));
}
}
- }
catch (final Throwable throwable)
{
logger.error(throwable);
|