emit_error()
Prev
Next

Name

emit_error() — emit an error-code (numeric) to the frontend

Synopsis

emit_error [error-code] [description]
echo description | emit_error [error-code]

Parameters

error-code

the numeric error code that should be sent to the frontend.

description

Description (string) for the error.

Description

emit_error() writes the error to stderr in the following format:

<acritoxinstaller backend error> error-code description

If no error-code and description is supplied then the error "255 unknown" is emitted.

emit_error() always returns non-zero, so that it can be used like this:

return non-zero, so you can use emit_error() like this:
some_function_call || emit_error 1 "Error!" || return
Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team