From fa40714be337c0ebab8e4b73a7177ecf6b671dba Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 19 Jul 2009 21:24:44 +0000 Subject: [PATCH] o Revised error handling, API misuse is really not a model/network problem git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@795622 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/model/building/DefaultModelBuilder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index b18a31a6e8..8279073440 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -488,10 +488,8 @@ public class DefaultModelBuilder if ( modelResolver == null ) { - problems.add( new ModelProblem( "Non-resolvable parent POM " + toId( parent ) + " for POM " - + toSourceHint( childModel ) + ": " + "No model resolver provided", ModelProblem.Severity.FATAL, - toSourceHint( childModel ) ) ); - throw new ModelBuildingException( problems ); + throw new IllegalArgumentException( "no model resolver provided, cannot resolve parent POM " + + toId( parent ) + " for POM " + toSourceHint( childModel ) ); } ModelSource modelSource;