mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Add finallyWithoutThrow concept
This commit is contained in:
10
concept-code/exceptions/finallyWithoutThrow.ts
Normal file
10
concept-code/exceptions/finallyWithoutThrow.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function () {
|
||||
let result: string;
|
||||
|
||||
try {
|
||||
} finally {
|
||||
result = "Ok";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
10
concept-code/exceptions/finallyWithoutThrow.vsm
Normal file
10
concept-code/exceptions/finallyWithoutThrow.vsm
Normal file
@@ -0,0 +1,10 @@
|
||||
export @_anon0 {}
|
||||
|
||||
@_anon0 = function() {
|
||||
set_catch :finally0 %_tmp0
|
||||
unset_catch
|
||||
finally0:
|
||||
mov "Ok" %result
|
||||
throw %_tmp0
|
||||
mov %result %return
|
||||
}
|
||||
Reference in New Issue
Block a user