-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Built with `quattor-documentation-builder -c -m src/ -o output/ --info` with some cleanup and whitespace trimming.
- Loading branch information
Showing
114 changed files
with
1,950 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
### NAME | ||
|
||
CAF::Exception - provides basic methods for failure and exception handling | ||
|
||
#### Private methods | ||
|
||
- \_get\_noaction | ||
|
||
Return NoAction setting: | ||
|
||
- Return 0 is `keeps_state` is true | ||
|
||
Any other value of `keeps_state` is ignored. (In particular, | ||
you cannot use `keeps_state` to enable NoAction). | ||
|
||
- Return value of `noAction` method (when defined) | ||
- `CAF::Object::NoAction` otherwise | ||
|
||
Supports an optional `msg` that is prefixed to reporter. | ||
|
||
- \_reset\_exception\_fail | ||
|
||
Reset previous fail attribute and/or exception. | ||
|
||
`msg` is a suffix when reporting the old `fail` attribute | ||
and/or exception error (with debug level 1). | ||
|
||
`EC` is a `LC::Exception::Context` instance that is checked for an | ||
existing error, which is set to ignore if it exists. | ||
|
||
Always returns SUCCESS. | ||
|
||
- \_function\_catch | ||
|
||
Execute function reference `funcref` with arrayref `$args` and hashref `$opts`. | ||
|
||
Method resets any existing fail attribute and error from `LC::Exception::Context` instance `EC`. | ||
|
||
When an exception thrown is thrown, it is catched and reset. No error is reported | ||
and undef is returned in this case and the fail attribute is set with the exception | ||
error text. | ||
|
||
- \_safe\_eval | ||
|
||
Run function reference `funcref` with arrayref `argsref` and hashref `optsref`. | ||
|
||
Return and set fail attribute with `failmsg` (`$@` is added when set) on die | ||
or in case of an error (`undef` returned by `funcref`). | ||
In case of success, report `msg` (stringified result is added unless `sensitive` attribute is set) | ||
at verbose level. | ||
|
||
Note that `_safe_eval` doesn't work with functions | ||
that don't return a defined value when they succeed. | ||
|
||
Resets previous fail attribute and or exceptions | ||
(via the `LC::Exception::Context` instance `EC`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.