Rough Draft Proposal: "Caused by" information provided when NPE is thrown

Florian Weimer fw at
Sat Mar 28 10:31:48 PDT 2009

* Jim Bethancourt:

> java.lang.NullPointerException
>  at com.code.NPEThrower(
>  ...
> Caused by: Null return value: Object.getName()
>       at
>       ...

I think that this is equivalent to providing useful exception
tracebacks in lazily evaluated languages: The null value is a promise,
and forcing it causes an exception which should be attributed to the
code which made the promise.  If the promise gets passed around quite
a bit, it's very difficult to provide useful information, performance
considerations aside.

To my knowledge, this is an open research problem.

More information about the coin-dev mailing list