You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/06/19 07:35:48 UTC
groovy git commit: provide slightly more error information when stub
test case fails
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_5_X ccd1873e6 -> 0f08c4bc0
provide slightly more error information when stub test case fails
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/0f08c4bc
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/0f08c4bc
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/0f08c4bc
Branch: refs/heads/GROOVY_2_5_X
Commit: 0f08c4bc0170a917c839e8f8cb6a5bf09d0bfac3
Parents: ccd1873
Author: Paul King <pa...@asert.com.au>
Authored: Tue Jun 19 17:35:16 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Tue Jun 19 17:35:44 2018 +1000
----------------------------------------------------------------------
.../groovy/tools/stubgenerator/StubTestCase.groovy | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/0f08c4bc/src/test/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy
index 2ecbef5..6e8f288 100644
--- a/src/test/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy
@@ -159,6 +159,7 @@ abstract class StubTestCase extends GroovyTestCase {
}
}
+ Throwable compileError = null
try {
compile(sources)
@@ -183,9 +184,19 @@ abstract class StubTestCase extends GroovyTestCase {
println "Verifying the stubs"
}
+ } catch(Throwable t) {
+ compileError = t
} finally {
- use (QDoxCategory) {
- verifyStubs()
+ try {
+ use (QDoxCategory) {
+ verifyStubs()
+ }
+ } catch(ex) {
+ if (compileError) {
+ println "Unable to verify stubs: $ex.message\nPerhaps due to earlier error?"
+ throw compileError
+ }
+ throw ex
}
if (sourceRootPath.getAbsolutePath() =~ 'stubgentests') {
sourceRootPath.deleteDir()