Files
ValueScript/concept-code/exceptions/tryFinally.vsm
2023-03-23 09:35:33 +11:00

12 lines
233 B
Plaintext

export @_anon0 {}
@_anon0 = function() {
set_catch :finally0 %_tmp0
new $Error ["Something went wrong"] %_tmp1
throw %_tmp1
unset_catch
finally0:
op+ 1 1 %ignore
throw %_tmp0 // doesn't throw if register contains void
}