|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
What the file activities hand to Data\Factory::error() when something failed: the result only takes exceptions, and maybePerformAs() promises to wrap every failure in a result - an \Error from deep inside a legacy service included.
More...
Collaboration diagram for ILIAS\FileUpload\Activities\Failure:Static Public Member Functions | |
| static | of (\Throwable $e) |
What the file activities hand to Data\Factory::error() when something failed: the result only takes exceptions, and maybePerformAs() promises to wrap every failure in a result - an \Error from deep inside a legacy service included.
Only an answer to the request leaves as it is: an exception with a code of the 4xx range, which is how the activities say what was wrong with a call. Everything else is a defect, and its message may carry what a caller must not see - a query, a path in the storage. It is replaced by a generic one and kept as the previous throwable for whoever debugs it.
The code has to be an int: a PDOException carries its SQLSTATE as a string, and ‘'42S22’` compares as being between 400 and 500.
Definition at line 38 of file Failure.php.
|
static |
Definition at line 40 of file Failure.php.
References Vendor\Package\$e.
Referenced by ILIAS\FileUpload\Activities\FailureTest\testADefectKeepsItsMessageInside(), and ILIAS\FileUpload\Activities\FailureTest\testAnAnswerToTheRequestLeavesAsItIs().
Here is the caller graph for this function: