Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3138ad49 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- improved error reporting

parent 8abaa507
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id$ * $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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
...@@ -143,7 +143,7 @@ public class AlignmentParser { ...@@ -143,7 +143,7 @@ public class AlignmentParser {
RDFParser rparser = new RDFParser( debugMode ); RDFParser rparser = new RDFParser( debugMode );
alignment = callParser( rparser, o ); alignment = callParser( rparser, o );
} else { } else {
throw new AlignmentException( "Cannot parse "+o, e ); throw new AlignmentException( "Cannot parse "+o+" (use debug>0 for more info)", e );
} }
} catch ( Exception ex ) { } catch ( Exception ex ) {
// JE: should contain both ex and e // JE: should contain both ex and e
...@@ -161,7 +161,7 @@ public class AlignmentParser { ...@@ -161,7 +161,7 @@ public class AlignmentParser {
if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) ); if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) );
if ( o instanceof Reader ) return p.parse((Reader)o); if ( o instanceof Reader ) return p.parse((Reader)o);
if ( o instanceof InputStream ) return p.parse((InputStream)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 { private Alignment callParser( RDFParser p, Object o ) throws AlignmentException {
...@@ -169,7 +169,7 @@ public class AlignmentParser { ...@@ -169,7 +169,7 @@ public class AlignmentParser {
if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) ); if ( o instanceof String ) return p.parse( new ByteArrayInputStream( ((String)o).getBytes() ) );
if ( o instanceof Reader ) return p.parse((Reader)o); if ( o instanceof Reader ) return p.parse((Reader)o);
if ( o instanceof InputStream ) return p.parse((InputStream)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 );
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment