From 80d4708ab9b54fe7ac45cd535124ea62b2fc273a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=8F=E7=83=88?= Date: Tue, 12 Jun 2018 14:45:05 +0800 Subject: [PATCH] fix https://github.com/alibaba/p3c/issues/264 --- .../kotlin/com/alibaba/p3c/idea/pmd/SourceCodeProcessor.kt | 2 ++ p3c-pmd/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/idea-plugin/p3c-common/src/main/kotlin/com/alibaba/p3c/idea/pmd/SourceCodeProcessor.kt b/idea-plugin/p3c-common/src/main/kotlin/com/alibaba/p3c/idea/pmd/SourceCodeProcessor.kt index 260be9f1c..15e24b71a 100644 --- a/idea-plugin/p3c-common/src/main/kotlin/com/alibaba/p3c/idea/pmd/SourceCodeProcessor.kt +++ b/idea-plugin/p3c-common/src/main/kotlin/com/alibaba/p3c/idea/pmd/SourceCodeProcessor.kt @@ -57,6 +57,8 @@ class SourceCodeProcessor(private val configuration: PMDConfiguration) { throw PMDException("Error while parsing " + ctx.sourceCodeFilename, pe) } catch (e: Exception) { throw PMDException("Error while processing " + ctx.sourceCodeFilename, e) + } catch (error: Error) { + throw PMDException("Error while processing ${ctx.sourceCodeFilename} ${error.message}") } finally { IOUtils.closeQuietly(sourceCode) } diff --git a/p3c-pmd/pom.xml b/p3c-pmd/pom.xml index 9b3a50b63..9740714bd 100644 --- a/p3c-pmd/pom.xml +++ b/p3c-pmd/pom.xml @@ -122,7 +122,7 @@ - +