Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328537

Summary: Add a b3 equivalence to NPE
Product: z_Archived Reporter: Henrik Lindberg <henrik.lindberg>
Component: b3Assignee: Project Inbox <b3.engine-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Henrik Lindberg CLA 2010-10-23 19:41:46 EDT
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.