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 @@ - +