mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 08:49:27 -04:00
15 lines
439 B
Groovy
15 lines
439 B
Groovy
// Basically, this is a shortcut for catchError(catchInterruptions: false) {}
|
|
// By default, catchError will swallow aborts/timeouts, which we almost never want
|
|
// Also, by wrapping it in an additional try/catch, we cut down on spam in Pipeline Steps
|
|
def call(Map params = [:], Closure closure) {
|
|
try {
|
|
closure()
|
|
} catch (ex) {
|
|
params.catchInterruptions = false
|
|
catchError(params) {
|
|
throw ex
|
|
}
|
|
}
|
|
}
|
|
|
|
return this
|