diff --git a/The-returnError-function.md b/The-returnError-function.md new file mode 100644 index 0000000..b2a464e --- /dev/null +++ b/The-returnError-function.md @@ -0,0 +1,9 @@ +**Notice:** Whenever possible make use of [`returnClientError`](#the-returnclienterror-function) or [`returnServerError`](#the-returnservererror-function) + +The `returnError` function aborts execution of the current bridge and returns the given error message with the provided error number: + +```PHP +returnError('Your error message', 404); +``` + +Check the [list of error codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for applicable error numbers. \ No newline at end of file