mirror of https://github.com/apache/maven.git
o Tweaked error reporting to exclude well-known exceptions
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@902613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b35b6222a
commit
a7cf185920
|
@ -205,7 +205,7 @@ public class DefaultExceptionHandler
|
|||
{
|
||||
reference = getReference( exception.getCause() );
|
||||
}
|
||||
else if ( !( exception instanceof RuntimeException ) )
|
||||
else if ( isNoteworthyException( exception ) )
|
||||
{
|
||||
reference = exception.getClass().getSimpleName();
|
||||
}
|
||||
|
@ -219,6 +219,27 @@ public class DefaultExceptionHandler
|
|||
return reference;
|
||||
}
|
||||
|
||||
private boolean isNoteworthyException( Throwable exception )
|
||||
{
|
||||
if ( exception == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( exception instanceof Error )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( exception instanceof RuntimeException )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( exception.getClass().getName().startsWith( "java" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String getMessage( String message, Throwable exception )
|
||||
{
|
||||
String fullMessage = ( message != null ) ? message : "";
|
||||
|
|
Loading…
Reference in New Issue