Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread Gábor Csárdi
Good points. In my case I also want to add an extra class to the condition, before re-throwing it. Sorry, this was not clear in my first email, I actually just realized it now. Gabor On Sat, Jul 28, 2018 at 6:43 PM wrote: > > On Sat, 28 Jul 2018, Gábor Csárdi wrote: > > > I don't want to return a

Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread luke-tierney
On Sat, 28 Jul 2018, Gábor Csárdi wrote: I don't want to return a value, I want to interrupt the computation, that's why I need to re-throw . But before getting back to the user I want to run some cleanup code. If it is just cleanup you want then a finally clause or on.exit should do, and will

Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread Gábor Csárdi
Great! invokeRestart("abort") is a life saver again, the second time this week! Thanks much! Gabor On Sat, Jul 28, 2018 at 6:37 PM wrote: > > The internal code does more or less > > signalCondition(e) ## allows for (another) handler > cat("\n") ## cleans up console >

Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread luke-tierney
The internal code does more or less signalCondition(e) ## allows for (another) handler cat("\n") ## cleans up console invokeRestart("abort") ## jump to 'abort' restart if not handled [for back compatibility it also runs the error option code if that is set, but that

Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread Gábor Csárdi
I don't want to return a value, I want to interrupt the computation, that's why I need to re-throw . But before getting back to the user I want to run some cleanup code. G. On Sat, Jul 28, 2018 at 5:59 PM Iñaki Úcar wrote: > > El sáb., 28 jul. 2018 a las 18:30, Gábor Csárdi > () escribió: > > > >

Re: [Rd] re-throwing an interrupt condition

2018-07-28 Thread Iñaki Úcar
El sáb., 28 jul. 2018 a las 18:30, Gábor Csárdi () escribió: > > Anyone knows a way to re-throw a caught interrupt condition, so that > it behaves just like the original one? I.e. no error message is > printed, but the execution is stopped of course. With just calling > stop in the error handler, i