From bdcb01374ef565b877ca3260dc23278a80d34772 Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Wed, 7 May 2014 15:39:23 +0800 Subject: [PATCH] improve error handling: notice which class has problem clearly --- .../worksap/oss/findbugs/guava/UnexpectedAccessDetector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/jp/co/worksap/oss/findbugs/guava/UnexpectedAccessDetector.java b/src/main/java/jp/co/worksap/oss/findbugs/guava/UnexpectedAccessDetector.java index c78b685..296af85 100644 --- a/src/main/java/jp/co/worksap/oss/findbugs/guava/UnexpectedAccessDetector.java +++ b/src/main/java/jp/co/worksap/oss/findbugs/guava/UnexpectedAccessDetector.java @@ -49,7 +49,8 @@ public void sawOpcode(int opcode) { try { verifyVisibility(invokedClass, invokedMethod); } catch (ClassNotFoundException e) { - throw new IllegalStateException(e); + String message = String.format("Detector could not find %s, you should add this class into CLASSPATH", invokedClass.getDottedClassName()); + bugReporter.logError(message, e); } } }