From 1195983e208e5e7dd10f241ee897dd8b693bfaee Mon Sep 17 00:00:00 2001 From: LogMANOriginal Date: Sat, 15 Sep 2018 20:51:43 +0200 Subject: [PATCH] Created The returnError function (markdown) --- The-returnError-function.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 The-returnError-function.md 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