-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIx nested InvocationTargetException #4192
FIx nested InvocationTargetException #4192
Conversation
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
A more general solution... def err = e
while( err instanceof InvocationTargetException )
err = err.cause |
modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy
Outdated
Show resolved
Hide resolved
According to the docs, |
Not according to the reality .. oops, screenshot was broken. |
Looking at the screenshot, my guess is that |
Good point
|
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
modules/nextflow/src/main/groovy/nextflow/script/BaseScript.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
modules/nextflow/src/main/groovy/nextflow/script/BaseScript.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Close #3418
When a method invoked via reflection throws an exception, the exception is wrapped in an
InvocationTargetException
.BaseScript
already has a catch block to unwrap this exception, but for some reason there are some cases where the exception is wrapped twice, such as the linked issue.I tried burying the user exception in more function calls and workflow calls, but it was only ever wrapped once or twice. So it does not seem to depend on the call depth, but I can't explain why it is wrapped sometimes once and sometimes twice. So I just check both cases.