[
https://issues.jboss.org/browse/JBRULES-3289?page=com.atlassian.jira.plug...
]
Geoffrey De Smet updated JBRULES-3289:
--------------------------------------
Fix Version/s: 5.4.0.Beta2
(was: 5.4.0.Beta1)
PackageBuilder.getErrors().toString() should use a clearer layout
(indentation and empty lines)
-----------------------------------------------------------------------------------------------
Key: JBRULES-3289
URL:
https://issues.jboss.org/browse/JBRULES-3289
Project: Drools
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: drools-compiler (expert)
Reporter: Geoffrey De Smet
Assignee: Edson Tirelli
Fix For: 5.4.0.Beta2
It's hard to read the compilation errors in drools (and parsing them in my head).
The main problem is parsing the points where the next compile error begins.
By adding some indentation and removing some confusing empty lines this can be made a lot
clearer.
BEFORE:
{code}// Start
Unable to resolve ObjectType 'NotExistingClass' : [Rule
name='serviceLocationSpread']
Unable to Analyse Expression location == $location:
[Error: unable to resolve method using strict-mode:
org.drools.planner.examples.machinereassignment.domain.MrProcessAssignment.$location()]
[Near : {... location == $location ....}]
^
[Line: 112, Column: 68] : [Rule name='serviceLocationSpread']
Rule Compilation error : [Rule name='serviceLocationSpread']
org/drools/planner/examples/machinereassignment/solver/Rule_serviceLocationSpread_503372c0945a4f2287a530f4ff3aee40.java
(9:2095) : $location cannot be resolved
// 2 extra empty lines
{code}
AFTER (with indentation):
{code}// Start
Unable to resolve ObjectType 'NotExistingClass' : [Rule
name='serviceLocationSpread']
Unable to Analyse Expression location == $location:
[Error: unable to resolve method using strict-mode:
org.drools.planner.examples.machinereassignment.domain.MrProcessAssignment.$location()]
[Near : {... location == $location ....}]
^
[Line: 112, Column: 68] : [Rule name='serviceLocationSpread']
Rule Compilation error : [Rule name='serviceLocationSpread']
org/drools/planner/examples/machinereassignment/solver/Rule_serviceLocationSpread_503372c0945a4f2287a530f4ff3aee40.java
(9:2095) : $location cannot be resolved
{code}
Just compare those two. The second one is easier to read diagonally and understand
what's going wrong.
It might be even better if the "Rule Compliation error" part comes first
(following the context-first guideline):
So instead of:
{code}
Error A1
Error A1 details
Error A2
Error A2 details
Rule Compilation error A
Rule Compilation error A details
Error B1
Error B1 details
Error B2
Error B2 details
Rule Compilation error B
Rule Compilation error B details
{code}
We get:
{code}
Rule Compilation error A
Rule Compilation error A details
Error A1
Error A1 details
Error A2
Error A2 details
Rule Compilation error B
Rule Compilation error B details
Error B1
Error B1 details
Error B2
Error B2 details
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira