o Made programming errors show up as internal errors to the user

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@938393 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-04-27 10:15:27 +00:00
parent ef776a9a17
commit 809969a06b
1 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@
*/
package org.apache.maven.lifecycle.internal;
import org.apache.maven.InternalErrorException;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.execution.BuildFailure;
import org.apache.maven.execution.ExecutionEvent;
@ -92,8 +93,13 @@ public class BuilderCommon
public void handleBuildError( final ReactorContext buildContext, final MavenSession rootSession,
final MavenProject mavenProject, final Exception e, final long buildStartTime )
final MavenProject mavenProject, Exception e, final long buildStartTime )
{
if ( e instanceof RuntimeException )
{
e = new InternalErrorException( "Internal error: " + e, e );
}
buildContext.getResult().addException( e );
long buildEndTime = System.currentTimeMillis();