diff --git a/doc/sample/Exception.im b/doc/sample/Exception.im new file mode 100644 index 0000000..a6a1f8b --- /dev/null +++ b/doc/sample/Exception.im @@ -0,0 +1,12 @@ +try + x = 0 + --v = Int parse:'342' +catch (#err:number_format, err) in + x = 1 + --cout put:'Cannot parse integer string ({err})' +catch (_, err) in + x = 2 + --cout put:'Unknown error occurred ({err})' +finally + x = 3 +end