From 11f8febd26e68c5aba432eefbaa88b6aacc71b2d Mon Sep 17 00:00:00 2001 From: Javier Sigler Date: Sat, 28 Oct 2017 20:44:36 +0200 Subject: [PATCH] Show the original cause This way you aren't hiding the original cause of mybatis exception. --- .../cuisongliu/plugin/generator/mybatis/MybatisGenerator.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/com/cuisongliu/plugin/generator/mybatis/MybatisGenerator.groovy b/src/main/groovy/com/cuisongliu/plugin/generator/mybatis/MybatisGenerator.groovy index 1ccff6c..cef0cc3 100644 --- a/src/main/groovy/com/cuisongliu/plugin/generator/mybatis/MybatisGenerator.groovy +++ b/src/main/groovy/com/cuisongliu/plugin/generator/mybatis/MybatisGenerator.groovy @@ -86,7 +86,7 @@ class MybatisGenerator extends DefaultTask { myBatisGenerator.generate(new GradleProgressCallback(project.mbg.consoleable), contextsToRun, fullyqualifiedTables); } catch (Exception e) { - throw new GradleException(e.getMessage()); + throw new GradleException(e.getMessage(), e); } for (String error : warnings) { println(error);