Opened 16 years ago
Closed 16 years ago
#155 closed enhancement (fixed)
Better error reporting from parser needed
| Reported by: | Stephen Siegel | Owned by: | ywei |
|---|---|---|---|
| Priority: | minor | Milestone: | Release 1.0 |
| Component: | Administration | Version: | 1.0 |
| Keywords: | front parser line source | Cc: |
Description
It would be nice if this exception from give the name of the file. In fact, can it give the complete source information?
java.lang.RuntimeException: 119: Unknown variable name: firstRow
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processLhs(TreeParser.java:1845)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processCallStmt(TreeParser.java:1803)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processStatement(TreeParser.java:1388)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processStmtList(TreeParser.java:692)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processFunctionBody(TreeParser.java:656)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processFunction(TreeParser.java:507)
at edu.udel.cis.vsl.minimp.front.minimp.parser.TreeParser.processAST(TreeParser.java:180)
at edu.udel.cis.vsl.minimp.front.minimp.ModelExtractor.extractPair(ModelExtractor.java:42)
at edu.udel.cis.vsl.minimp.front.minimp.ModelExtractor.extractModelPair(ModelExtractor.java:61)
at laplace.Laplace1Test.setUpBeforeClass(Laplace1Test.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Change History (2)
comment:1 by , 16 years ago
| Status: | new → accepted |
|---|
comment:2 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Added a SyntaxError class in the parser package to report parser errors.

I will added the source information (line, column, file) to tree parser.