[Jboss-cvs] JBossAS SVN: r55208 - branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/spi
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 4 13:01:54 EDT 2006
Author: scott.stark at jboss.org
Date: 2006-08-04 13:01:52 -0400 (Fri, 04 Aug 2006)
New Revision: 55208
Modified:
branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/spi/DeploymentException.java
Log:
Add a rethrowAsDeploymentException helper method
Modified: branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/spi/DeploymentException.java
===================================================================
--- branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/spi/DeploymentException.java 2006-08-04 16:52:38 UTC (rev 55207)
+++ branches/MC_VDF_WORK/system/src/main/org/jboss/deployers/spi/DeploymentException.java 2006-08-04 17:01:52 UTC (rev 55208)
@@ -17,7 +17,25 @@
*/
public class DeploymentException extends Exception
{
+ private static final long serialVersionUID = 1L;
+
/**
+ * Rethrow a throwable as a deployment exception if it isn't already.
+ *
+ * @param message the message
+ * @param t the throwable
+ * @throws a DeploymentException
+ */
+ public static void rethrowAsDeploymentException(String message, Throwable t)
+ throws DeploymentException
+ {
+ if (t instanceof DeploymentException)
+ throw (DeploymentException) t;
+ else
+ throw new DeploymentException(message, t);
+ }
+
+ /**
* Constructs a <code>DeploymentException</code> with <code>null</code>
* as its error detail message.
*/
More information about the jboss-cvs-commits
mailing list