Created The returnError function (markdown)

LogMANOriginal 2018-09-15 20:51:43 +02:00
parent 7c7c0af9a2
commit 1195983e20

@ -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.