Skip to content

Commit 547b028

Browse files
committed
Correct handling of the error, allowing it to be picked up by error handlers (while still throwing the Exception in STRICT mode)
1 parent ba805ea commit 547b028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Reader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,13 +1321,13 @@ private IAtom createAtom(String symbol, IChemObjectBuilder builder, int lineNum)
13211321
return atom;
13221322
}
13231323
if (symbol.equals("D") && interpretHydrogenIsotopes.isSet()) {
1324-
if (mode == Mode.STRICT) throw new CDKException("invalid symbol: " + symbol);
1324+
handleError("invalid symbol: " + symbol, lineNum, 31, 33);
13251325
IAtom atom = builder.newInstance(IAtom.class, "H");
13261326
atom.setMassNumber(2);
13271327
return atom;
13281328
}
13291329
if (symbol.equals("T") && interpretHydrogenIsotopes.isSet()) {
1330-
if (mode == Mode.STRICT) throw new CDKException("invalid symbol: " + symbol);
1330+
handleError("invalid symbol: " + symbol, lineNum, 31, 33);
13311331
IAtom atom = builder.newInstance(IAtom.class, "H");
13321332
atom.setMassNumber(3);
13331333
return atom;

0 commit comments

Comments
 (0)