Author: ruschein
Date: 2010-09-27 14:28:22 -0700 (Mon, 27 Sep 2010)
New Revision: 22076
Modified:
cytoscape/trunk/corelibs/equations/src/main/java/org/cytoscape/equations/EqnParserImpl.java
Log:
Improved error reporting for strings that may be intended to be text rather
than function names but that are missing enclosing quotes.
Modified:
cytoscape/trunk/corelibs/equations/src/main/java/org/cytoscape/equations/EqnParserImpl.java
===================================================================
---
cytoscape/trunk/corelibs/equations/src/main/java/org/cytoscape/equations/EqnParserImpl.java
2010-09-27 21:12:16 UTC (rev 22075)
+++
cytoscape/trunk/corelibs/equations/src/main/java/org/cytoscape/equations/EqnParserImpl.java
2010-09-27 21:28:22 UTC (rev 22076)
@@ -316,9 +316,14 @@
return parseDefined();
final Function func =
nameToFunctionMap.get(functionNameCandidate);
- if (func == null)
- throw new IllegalStateException(functionNameStartPos +
": call to unknown function "
- + functionNameCandidate
+ "()!");
+ if (func == null) {
+ if (tokeniser.getToken() == Token.OPEN_PAREN)
+ throw new
IllegalStateException(functionNameStartPos + ": call to unknown function "
+ +
functionNameCandidate + "()!");
+ else
+ throw new
IllegalStateException(functionNameStartPos + ": unknown text \""
+ +
functionNameCandidate + "\", maybe you forgot to put quotes around this text?");
+ }
token = tokeniser.getToken();
final int openParenPos = tokeniser.getStartPos();
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.