You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
361 B

# Exception chaining is not supported, but check that basic
# exception works as expected.
try:
raise Exception from None
except Exception:
print("Caught Exception")
try:
try:
raise ValueError("Value")
except Exception as exc:
raise RuntimeError("Runtime") from exc
except Exception as ex2:
print("Caught Exception:", ex2)