Page 5 of 23
error
Displays an error message
If the SF_ERRLOG environment variable is set, it is supposed to contain a path. The error message will be appended to the file at this path. If the file does not exist, it will be created.
Arguments
$1 | Message |
Returns
Always 0Displays
Error messageerror_count
Display a count of errors detected so far
Arguments
None
Returns
Always 0Displays
Error counterror_import
Import errors into the error system
This mechanism is generally used in conjunction with the $SF_ERRLOG variable. This variable is used to temporarily distract errors from the normal flow. Then, this function can be called to reinject errors into the default error repository.
Arguments
$1 | Optional. File to import (1 error per line). If not set, takes input from stdin. |
Returns
Always 0Displays
Nothingfatal
Displays an error message and aborts execution
Arguments
$1 | message |
$2 | Optional. Exit code. |
Returns
Does not return. Exits with the provided exit code if arg 2 set, with 1 if not.Displays
Error and abort messagesshow_errors
Display a list of errors detected so far
Arguments
None
Returns
Always 0Displays
List of error messages, one by lineunsupported
Fatal error on unsupported feature
Call this function when a feature is not available on the current operating system (yet ?)
Arguments
$1 | feature name |