[Koha-bugs] [Bug 13995] Proper Exception handling

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 14 17:14:41 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13995

--- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 37827
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37827&action=edit
Bug 13995 - Proper Exception handling

try {
    Koha::Exception::BadSystemPreference->throw(error => 'Syspref
DisplayIconsXSLT is not a valid boolean');
} catch {
    if (blessed($_) && $_->isa('Koha::Exception::BadSystemPreference')) {
        print $_->as_string();
        warn $_->error, "\n", $_->trace->as_string, "\n";
    }
    else {
        $_->rethrow();
    }
}

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list