From 1dcf7bed66af4d683f7627c9ce6f50a2e4e2ab12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr>
Date: Tue, 19 Apr 2011 12:37:24 +0000
Subject: [PATCH] - improved a few error messages

---
 src/fr/inrialpes/exmo/align/parser/RDFParser.java | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/fr/inrialpes/exmo/align/parser/RDFParser.java b/src/fr/inrialpes/exmo/align/parser/RDFParser.java
index 62415fcc..392ba91f 100644
--- a/src/fr/inrialpes/exmo/align/parser/RDFParser.java
+++ b/src/fr/inrialpes/exmo/align/parser/RDFParser.java
@@ -322,10 +322,7 @@ public class RDFParser {
      *             if the node is null
      */
     protected Ontology parseOntology(final Resource node) throws AlignmentException {
-	if (node == null) {
-	    throw new AlignmentException("The ontology node must not be null");
-	}
-
+	if (node == null) throw new AlignmentException("The Ontology node must not be null");
 	try {
 	    Resource formu = node.getProperty((Property)SyntaxElement.FORMATT.resource).getResource();
 	    final String formalismName = formu.getProperty((Property)SyntaxElement.NAME.resource).getString();
@@ -338,8 +335,7 @@ public class RDFParser {
 	    if ( location != null ) onto.setFile( new URI( location.getString() ) );
 	    return onto;
 	} catch ( Exception e ) {
-	    throw new AlignmentException("The ontology node isn't correct: "
-					 + node.getLocalName(), e);
+	    throw new AlignmentException("The Ontology node is not correct: "+ node.getLocalName(), e);
 	}
     }
 
@@ -363,8 +359,7 @@ public class RDFParser {
 	    //Get the relation
 	    final EDOALRelation type = new EDOALRelation( relation );
 	    if (type == null) {	// I raise an error in this case anyway
-		throw new IllegalArgumentException("Couln't parse the string \"" + relation
-						   +"\" to a valid rule type");
+		throw new IllegalArgumentException("Cannot parse the string \""+relation+"\" to a valid relation");
 	    }
 	    // parse the measure, the node shall be Literal and it's a number
 	    final float m = node.getProperty((Property)SyntaxElement.MEASURE.resource).getFloat();
-- 
GitLab