Author: bentmann Date: Sat Nov 7 17:51:36 2009 New Revision: 833724 URL: http://svn.apache.org/viewvc?rev=833724&view=rev Log: o Tweaked error reporting
Added: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java (with props) Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=833724&r1=833723&r2=833724&view=diff ============================================================================== --- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original) +++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Sat Nov 7 17:51:36 2009 @@ -109,6 +109,12 @@ { result = processResult( new DefaultMavenExecutionResult(), e ); } + catch ( RuntimeException e ) + { + result = + processResult( new DefaultMavenExecutionResult(), + new InternalErrorException( "Internal error: " + e, e ) ); + } return result; } Added: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java?rev=833724&view=auto ============================================================================== --- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java (added) +++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java Sat Nov 7 17:51:36 2009 @@ -0,0 +1,36 @@ +package org.apache.maven; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Signals an internal error in Maven itself, e.g. a programming bug. + * + * @author Benjamin Bentmann + */ +public class InternalErrorException + extends MavenExecutionException +{ + + public InternalErrorException( String message, Throwable cause ) + { + super( message, cause ); + } + +} Propchange: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/InternalErrorException.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision