On Sat, 4 Jul 2020 at 13:27, Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > On Sat, 4 Jul 2020 12:14:15 +0200 > Branislav ZahradnÃk <happy.barney@gmail.com> wrote: > > > `try` block to contain it. The `try` part of `try/catch` syntax exists > primarily for the benefit of the human programmer, not the perl > interpreter. > This way you are still handling only exceptions ignoring other asynchronous events. ad benefit of the human, here I will disagree. I modified some java code to show an example: Original method with try/catch: https://pastebin.com/eSV5AgRd Modified with lexical catch: https://pastebin.com/kHWjTs2r As a human reader it's easier for me to be notified about possible exit before exit happens. (Imagine GPS navigation talking like try/catch block: "200 meters ago you had to turn left") > -- > Paul "LeoNerd" Evans > > leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS > http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/ >Thread Previous | Thread Next