python 3 user defined exception code example Example: create custom exception python class CustomError(Exception): pass