def explicit_chaining(): """ This is the syntax to show that an exception has been caused by a previous one but it's not unexpected like in the previous example. The message used to chain the exception tracebacks in this case will be: The above exception was the direct cause of the following exception: This is useful when the original exception may contain information that can be helpful in debugging the issue etc. """ try: 1/0 except Exception as ex: raise RuntimeError('Something') from ex explicit_chaining()