| Summary: | Add a b3 equivalence to NPE | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Henrik Lindberg <henrik.lindberg> |
| Component: | b3 | Assignee: | Project Inbox <b3.engine-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
If a "NPE" is the result of evaluating b3 code it is not very valuable to get a java NPE as user wants to know where in the b3 code the error occurred, not where in java. Consider var a = [<String, (Integer)=>Integer)> myfunc : { x| x.bitwiseAnd(2) } ]; assertEquals("invoke on func in map", 2, a["myXXX"].invoke(2)); (With static analysis it could also be inferred that a["myXXX"] can not be anything but null at the point invoke is called - but that is a different issue). Currently invoke, and other functions may throw either a NPE, or some IllegalArgumentException.