-
-
Save ftsf/2da6d5abce35eec083a061dd5cacdc43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MyNewException = ref object of Exception | |
foo*: int | |
try: | |
var newE = new(MyNewException) | |
newE.msg = "foo" | |
newE.foo = 10 | |
raise newE | |
except MyNewException: | |
let e = getCurrentException().MyNewException | |
echo e.foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment