Skip to main content

Timeline for answer to rethrowing python exception. Which to catch? by ibebrett

Current License: CC BY-SA 3.0

Post Revisions

2 events
when toggle format what by license comment
Dec 20, 2018 at 16:30 comment added Daniel Goldfarb Seems the other answer got the most votes, possibly due to its detail and "try it and see" approach (always good), but imho it doesn't actually answer the original question which was "Which one will be caught in the outer 'catch-except'? The one you rethrow or the one thrown by do_something_to_apologize() ?" This answer by ibebrett does answer that question. The general rule is that once something raises an exception, nothing else can also raise an exception until that first exception is caught: thus if apologize() raises an exception then the raise right after it will never get executed.
Jul 28, 2014 at 18:38 history answered ibebrett CC BY-SA 3.0