Skip to content

Commit

Permalink
Added line number and SMILES string to error message
Browse files Browse the repository at this point in the history
solves bug 3390
  • Loading branch information
goglepox committed Oct 29, 2012
1 parent 7528311 commit 678a875
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1245,8 +1245,10 @@ public IteratingBioclipseSMILESReader( IFile file,

private ICDKMolecule getNext() {
ICDKMolecule mol = null;
String errorLine = null;
try {
String line = reader.readLine();
errorLine = line;
if ( line == null ) { return null; }
if (separator != null) {
String[] cols = line.split( separator );
Expand All @@ -1260,7 +1262,8 @@ private ICDKMolecule getNext() {
}
}
catch (BioclipseException e) {
throw new RuntimeException(e.getMessage(), e);
throw new RuntimeException("Error reading SMILES on line "+
(readLines+2)+": \""+errorLine+"\" "+e.getMessage(), e);
}
catch ( IOException e ) {
LogUtils.debugTrace( logger, e );
Expand Down

0 comments on commit 678a875

Please sign in to comment.