Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
1
Task/Exceptions/Nim/exceptions-1.nim
Normal file
1
Task/Exceptions/Nim/exceptions-1.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
type SillyError = object of Exception
|
||||
2
Task/Exceptions/Nim/exceptions-2.nim
Normal file
2
Task/Exceptions/Nim/exceptions-2.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
proc spam() =
|
||||
raise newException(SillyError, "Some error")
|
||||
8
Task/Exceptions/Nim/exceptions-3.nim
Normal file
8
Task/Exceptions/Nim/exceptions-3.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
try:
|
||||
spam()
|
||||
except SillyError:
|
||||
echo "Got SillyError with message: ", getCurrentExceptionMsg()
|
||||
except:
|
||||
echo "Got another exception"
|
||||
finally:
|
||||
echo "Finally"
|
||||
Loading…
Add table
Add a link
Reference in a new issue