Groovy web console

subscribe to the feed Subscribe
to this
site

Re-throw test

Published 1 month ago by handris with tags try catch finally re-throw
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
println('begin')
try{
 println('in try')
 throw new Exception("Some exception")
}
catch(e){
 println('in catch')
 println(e)
 throw e
 println('after reraise')
}
finally{
 println('in finally')
}
println('end')