Permalink
Browse files

Improved error message to show what character the parser was trying t…

…o interpret as symbol

Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
1 parent cf47901 commit 555f8567fb2700a4444cb8ca99e1c0bdb0fa2520 @egonw egonw committed with rajarshi Jun 25, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/org/openscience/cdk/smiles/SmilesParser.java
@@ -775,9 +775,9 @@ private IAtom assembleAtom(String s, IAtom lastNode, boolean bondExists) throws
currentSymbol = getElementSymbol(s, position);
if (currentSymbol == null)
{
- throw new InvalidSmilesException(
- "Expected element symbol, found null!"
- );
+ throw new InvalidSmilesException(
+ "Expected element symbol, found " + mychar + "!"
+ );
} else
{
logger.debug("Found element symbol: ", currentSymbol);

0 comments on commit 555f856

Please sign in to comment.