Author: michiel
Date: 2010-03-11 11:40:59 +0100 (Thu, 11 Mar 2010)
New Revision: 41326
Modified:
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
Log:
made it extens exception so that I can opt to throw it
Modified:
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
===================================================================
---
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
2010-03-11 10:33:25 UTC (rev 41325)
+++
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
2010-03-11 10:40:59 UTC (rev 41326)
@@ -19,7 +19,7 @@
* Errors are obscured now by lack of stack-traces, and the code is littered
with try/catch-blocks.
*/
-public class GlobalError {
+public class GlobalError extends RuntimeException {
/**
* This is the type of error that is created when something went wrong,
and the transaction can not be committed in
@@ -37,6 +37,7 @@
* the key of the error message in the resourceBundle with
messages
*/
public GlobalError(String messageKey, Locale locale) {
+ super(messageKey);
this.messageKey = messageKey;
initBundle(locale);
}
@@ -48,9 +49,8 @@
* @param properties
*/
public GlobalError(String messageKey, String[] properties, Locale locale) {
- this.messageKey = messageKey;
+ this(messageKey, locale);
this.properties = properties;
- initBundle(locale);
}
public String getMessageKey() {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs