example-custom-exceptions.ref 479 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Can we catch a MyException?
MyException : this error should go to a custom type

Can we translate to standard Python exceptions?
RuntimeError : this error should go to a standard Python exception

Can we handle unknown exceptions?
RuntimeError : Caught an unknown exception!

Can we delegate to another handler by rethrowing?
MyException : this error is rethrown

Can we fall-through to the default handler?
RuntimeError : this error should fall through to the standard handler