From 7ada401b6d613d88d72500c89f0a268eb470ace3 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 17 Sep 2012 17:19:05 +0200 Subject: If val errors out, now at least you see where it happened. --- src/core/lombok/javac/handlers/HandleVal.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core/lombok') diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java index d7a31708..9cd8400e 100644 --- a/src/core/lombok/javac/handlers/HandleVal.java +++ b/src/core/lombok/javac/handlers/HandleVal.java @@ -95,7 +95,12 @@ public class HandleVal extends JavacASTAdapter { if (rhsOfEnhancedForLoop == null) { if (local.init.type == null) { JavacResolution resolver = new JavacResolution(localNode.getContext()); - type = ((JCExpression) resolver.resolveMethodMember(localNode).get(local.init)).type; + try { + type = ((JCExpression) resolver.resolveMethodMember(localNode).get(local.init)).type; + } catch (RuntimeException e) { + System.err.println("Exception while resolving: " + localNode); + throw e; + } } else { type = local.init.type; } -- cgit