You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2011/02/23 14:18:29 UTC

svn commit: r1073732 - in /myfaces/extensions/cdi/trunk: core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/ jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ jse-modules/scripting-module/impl/src...

Author: gpetracek
Date: Wed Feb 23 13:18:28 2011
New Revision: 1073732

URL: http://svn.apache.org/viewvc?rev=1073732&view=rev
Log:
cleanup

Modified:
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/UnhandledException.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ExceptionUtils.java
    myfaces/extensions/cdi/trunk/jse-modules/scripting-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/scripting/impl/util/ExceptionUtils.java

Modified: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/UnhandledException.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/UnhandledException.java?rev=1073732&r1=1073731&r2=1073732&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/UnhandledException.java (original)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/UnhandledException.java Wed Feb 23 13:18:28 2011
@@ -25,6 +25,11 @@ public class UnhandledException extends 
 {
     private static final long serialVersionUID = -2218238182931072197L;
 
+    public UnhandledException(String message)
+    {
+        super(message);
+    }
+
     public UnhandledException(Throwable cause)
     {
         super(cause);

Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ExceptionUtils.java?rev=1073732&r1=1073731&r2=1073732&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ExceptionUtils.java (original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/util/ExceptionUtils.java Wed Feb 23 13:18:28 2011
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.cd
 import org.apache.myfaces.extensions.cdi.core.api.config.view.ViewConfig;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContext;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.Conversation;
+import org.apache.myfaces.extensions.cdi.core.api.UnhandledException;
 import org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager;
 import org.apache.myfaces.extensions.cdi.jsf.api.config.view.InlineViewConfigRoot;
 import org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext;
@@ -46,32 +47,32 @@ public class ExceptionUtils
 
     public static RuntimeException tooManyOpenWindowException(int windowContextTimeoutInMinutes)
     {
-        return new RuntimeException("Too many active windows/tabs have been opened!" +
+        return new UnhandledException("Too many active windows/tabs have been opened!" +
             " Please continue with one of the existing windows or wait up to "
                 + windowContextTimeoutInMinutes + " minutes.");
     }
 
     public static RuntimeException windowContextManagerNotEditableException(WindowContextManager windowContextManager)
     {
-        return new RuntimeException(windowContextManager.getClass().getName() + " has to implement "
+        return new UnhandledException(windowContextManager.getClass().getName() + " has to implement "
                 + EditableWindowContextManager.class.getName());
     }
 
     public static RuntimeException windowContextNotEditableException(WindowContext windowContext)
     {
-        return new RuntimeException(windowContext.getClass().getName() + " has to implement "
+        return new UnhandledException(windowContext.getClass().getName() + " has to implement "
                 + EditableWindowContext.class.getName());
     }
 
     public static RuntimeException conversationNotEditableException(Conversation conversation)
     {
-        return new RuntimeException(conversation.getClass().getName() + " has to implement "
+        return new UnhandledException(conversation.getClass().getName() + " has to implement "
                 + EditableConversation.class.getName());
     }
 
     public static RuntimeException invalidViewException(String viewId)
     {
-        return new RuntimeException("View-ID: " + viewId + " doesn't exist.");
+        return new UnhandledException("View-ID: " + viewId + " doesn't exist.");
     }
 
     public static IllegalArgumentException invalidPhasesCallbackMethod(Class targetClass, Method method)

Modified: myfaces/extensions/cdi/trunk/jse-modules/scripting-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/scripting/impl/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/scripting-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/scripting/impl/util/ExceptionUtils.java?rev=1073732&r1=1073731&r2=1073732&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/scripting-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/scripting/impl/util/ExceptionUtils.java (original)
+++ myfaces/extensions/cdi/trunk/jse-modules/scripting-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/scripting/impl/util/ExceptionUtils.java Wed Feb 23 13:18:28 2011
@@ -21,6 +21,7 @@ package org.apache.myfaces.extensions.cd
 import org.apache.myfaces.extensions.cdi.scripting.impl.spi.LanguageBean;
 import org.apache.myfaces.extensions.cdi.scripting.api.language.Language;
 import org.apache.myfaces.extensions.cdi.scripting.api.ScriptBuilder;
+import org.apache.myfaces.extensions.cdi.core.api.UnhandledException;
 
 import javax.enterprise.inject.Typed;
 
@@ -36,29 +37,29 @@ public class ExceptionUtils
 
     public static RuntimeException unknownScriptingLanguage(String name)
     {
-        return new RuntimeException("No scripting engine found for: " + name);
+        return new UnhandledException("No scripting engine found for: " + name);
     }
 
     public static RuntimeException noScriptingLanguageAvailable()
     {
-        return new RuntimeException("No bean of type " + LanguageBean.class.getName() + " found!");
+        return new UnhandledException("No bean of type " + LanguageBean.class.getName() + " found!");
     }
 
     public static RuntimeException noScriptingLanguageAvailableFor(Class<? extends Language> languageType)
     {
-        return new RuntimeException("No language is mapped to " + languageType.getName());
+        return new UnhandledException("No language is mapped to " + languageType.getName());
     }
 
     public static RuntimeException ambiguousLanguageDefinition(
             Class<? extends Language> id, Language foundLanguage, Language newLanguage)
     {
-        return new RuntimeException("Invalid approach detected to replace " + id.getName() + ". Can't replace " +
+        return new UnhandledException("Invalid approach detected to replace " + id.getName() + ". Can't replace " +
             foundLanguage.getClass().getName() + " with " + newLanguage.getClass().getName());
     }
 
     public static RuntimeException overrideBuilderState(String newValueHint)
     {
-        return new RuntimeException("Invalid script builder (" + ScriptBuilder.class.getName() + ") state. " +
+        return new UnhandledException("Invalid script builder (" + ScriptBuilder.class.getName() + ") state. " +
             "It isn't allowed to override the existing state of the builder with new " + newValueHint);
     }
 }