Syntax errors are parsing errors, so invalid source within a try suite prevents that try statement from running and cannot be caught by its own except clause. Exceptions that occur during execution of the try suite are handled by a matching except clause; after that handler completes normally, execution continues after the try statement. An error raised inside an except handler is not handled by another handler of the same try statement. Code that may raise an exception should be placed in the try suite.
Community Discussion