o Widened exception type to allow handling of errors, too

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@825512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-10-15 15:17:34 +00:00
parent 759928f4d0
commit 5864960314
6 changed files with 10 additions and 10 deletions

View File

@ -269,7 +269,7 @@ public class DefaultMaven
return lifecycleListeners;
}
private MavenExecutionResult processResult( MavenExecutionResult result, Exception e )
private MavenExecutionResult processResult( MavenExecutionResult result, Throwable e )
{
ExceptionHandler handler = new DefaultExceptionHandler();

View File

@ -79,7 +79,7 @@ Plugins:
public class DefaultExceptionHandler
implements ExceptionHandler
{
public ExceptionSummary handleException( Exception exception )
public ExceptionSummary handleException( Throwable exception )
{
String message;

View File

@ -21,5 +21,5 @@ package org.apache.maven.exception;
public interface ExceptionHandler
{
ExceptionSummary handleException( Exception e );
ExceptionSummary handleException( Throwable e );
}

View File

@ -28,20 +28,20 @@ package org.apache.maven.exception;
public class ExceptionSummary
{
private Exception exception;
private Throwable exception;
private String message;
private String reference;
public ExceptionSummary( Exception exception, String message, String reference )
public ExceptionSummary( Throwable exception, String message, String reference )
{
this.exception = exception;
this.message = message;
this.reference = reference;
}
public Exception getException()
public Throwable getException()
{
return exception;
}

View File

@ -81,16 +81,16 @@ public class DefaultMavenExecutionResult
return this;
}
public List getExceptions()
public List<Throwable> getExceptions()
{
return exceptions == null ? Collections.EMPTY_LIST : exceptions;
return exceptions == null ? Collections.<Throwable> emptyList() : exceptions;
}
public MavenExecutionResult addException( Throwable t )
{
if ( exceptions == null )
{
exceptions = new ArrayList();
exceptions = new ArrayList<Throwable>();
}
exceptions.add( t );

View File

@ -44,7 +44,7 @@ public interface MavenExecutionResult
// - project building exception
// - invalid project model exception: list of markers
// - xmlpull parser exception
List<Exception> getExceptions();
List<Throwable> getExceptions();
MavenExecutionResult addException( Throwable e );