Skip to content

Commit

Permalink
Enable incontainer deployment exceptions
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@1718 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Feb 26, 2009
1 parent 0d046f3 commit 0c323f6
Showing 1 changed file with 16 additions and 3 deletions.
Expand Up @@ -5,10 +5,12 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;

import javax.naming.InitialContext;

import org.apache.log4j.Logger;
import org.jboss.deployers.client.spi.IncompleteDeploymentException;
import org.jboss.deployers.spi.management.deploy.DeploymentManager;
import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
Expand Down Expand Up @@ -84,12 +86,23 @@ public void deploy(InputStream archiveStream, String name) throws DeploymentExce
}
catch (Exception e)
{
IOException ioe = new IOException();
ioe.initCause(e);
throw ioe;
IOException ioe = new IOException();
ioe.initCause(e);
throw ioe;
}
if (failure != null)
{
if (failure.getCause() instanceof IncompleteDeploymentException)
{
IncompleteDeploymentException incompleteDeploymentException = (IncompleteDeploymentException) failure.getCause();
for (Entry<String, Throwable> entry : incompleteDeploymentException.getIncompleteDeployments().getContextsInError().entrySet())
{
if (entry.getKey().endsWith(name + "/_WebBeansBootstrap"))
{
throw new DeploymentException(entry.getValue());
}
}
}
throw new DeploymentException(failure);
}
}
Expand Down

0 comments on commit 0c323f6

Please sign in to comment.