Thanks alot to all! My bad: I completely forgot that “catch (foo)” implies
Exception foo, and not Throwable foo.
OC
On 12. 10. 2016, at 18:59, Jim White wrote:
> The recommended way to have an exception that can't be caught except in
> specifically intended places i
l, it
simply returns null
a.foo+b+c[d] // and so forth with any other operation
}
}
That would be, in my personal opinion, completely safe, and would help a lot?
Thanks and all the best,
OC
P.S. just to stay at the precise side...
On 9. 11. 2016, at 16:33, OC wrote:
> @AlwaysSafe class foo {
> def bar(a,b,c,d) { // this method never NPEs
unless a.foo implementation does, of course!
> ; if any argument is null, it simply returns null
>a.foo+b+c[d] // and so fo
tions instead of clean, concise and stable proxying; but
that's another story, and based on some older debates with Jochen I am afraid
this would not be possible at all, for the exception probably is caused by JVM
and can't be dodged anyhow.)
Thanks and all the best,
OC
> 2016-11-09 16