Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use optional module Scope::Cleanup for trapping exceptions from the finally block #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 14, 2018

  1. Use optional module Scope::Cleanup for trapping exceptions from the f…

    …inally block
    
    Currently throwing exception from the finally block show just:
    
    Execution of finally() block $code resulted in an exception, which
    *CAN NOT BE PROPAGATED* due to fundamental limitations of Perl.
    
    This patch implements throwing exceptions form the finally block via
    optional module Scope::Cleanup. When module is not installed then Try::Tiny
    would show same message as before. When installed, then it cleanup will
    rethrow exception from finally block back to the caller.
    
    There is also a new test which check that finally blocks are always called
    in same order as before this patch.
    pali committed Jan 14, 2018
    Configuration menu
    Copy the full SHA
    92d978f View commit details
    Browse the repository at this point in the history