Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
[From Brian Goetz] public class Foo { public static void main(String[] args) { Runnable r = () -> { throw new RuntimeException(); }; r.run(); } } which produces: Exception in thread "main" java.lang.RuntimeException at Foo.lambda$0(Foo.java:3) at Foo$$Lambda$1.run(Unknown Source) at Foo.main(Foo.java:4) Here, Foo$$Lambda$1 is a synthetic class generated by the bootstrap of the lambda factory call site. (Lambdas are created by invoking an invokedynamic callsite, which returns the lambda. The bootstrap spins classes as necessary.) Ideally the user would want to see the calling line (r.run()) and the callee (the lambda) and nothing in between.
|