From 3138ad49dac37609bda15cc800abe57723c57a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Sun, 13 May 2012 08:53:41 +0000 Subject: [PATCH] - improved error reporting --- src/fr/inrialpes/exmo/align/parser/AlignmentParser.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java b/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java index 53bdb777..c84d9d15 100644 --- a/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java +++ b/src/fr/inrialpes/exmo/align/parser/AlignmentParser.java @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (C) INRIA, 2003-2005, 2007-2010 + * Copyright (C) INRIA, 2003-2005, 2007-2010, 2012 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -143,7 +143,7 @@ public class AlignmentParser { RDFParser rparser = new RDFParser( debugMode ); alignment = callParser( rparser, o ); } else { - throw new AlignmentException( "Cannot parse "+o, e ); + throw new AlignmentException( "Cannot parse "+o+" (use debug>0 for more info)", e ); } } catch ( Exception ex ) { // JE: should contain both ex and e @@ -161,7 +161,7 @@ public class AlignmentParser { if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) ); if ( o instanceof Reader ) return p.parse((Reader)o); if ( o instanceof InputStream ) return p.parse((InputStream)o); - throw new AlignmentException( "AlignmentParser: cannot parse :"+o ); + throw new AlignmentException( "AlignmentParser: XMLParser cannot parse :"+o ); } private Alignment callParser( RDFParser p, Object o ) throws AlignmentException { @@ -169,7 +169,7 @@ public class AlignmentParser { if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) ); if ( o instanceof Reader ) return p.parse((Reader)o); if ( o instanceof InputStream ) return p.parse((InputStream)o); - throw new AlignmentException( "AlignmentParser: cannot parse :"+o ); + throw new AlignmentException( "AlignmentParser: RDFParser cannot parse :"+o ); } /** -- GitLab