Steven Haryanto > Perinci-Sub-Property-dies_on_error > lib/Perinci/Sub/Property/dies_on_error.pm~

Download:
Perinci-Sub-Property-dies_on_error-0.04.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

SYNOPSIS ^

Without dies_on_error:

 # on successful call
 f(...); # [200, "OK"]

 # on non-successful call
 f(...); # [404, "Not found"]

With dies_on_error=>1:

 # on successful call
 f(...); # [200, "OK"]

 # on non-successful call
 f(...); # dies with message "Call f() failed with 404 status: Not found"

DESCRIPTION ^

This property sets so that function dies when result status is a non-successful one (it even dies under wrapping option trap=>1). Successful statuses by default include 2xx and 304.

SEE ALSO ^

Perinci

syntax highlighting: