From b8c283a695c8074a57d8c3dfa00934312638931d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:02:53 -0700 Subject: Dropping unecessary php: directive to function definitions in user guide --- user_guide_src/source/general/errors.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'user_guide_src/source/general/errors.rst') diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index f12d992f8..6cc8a0966 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -21,8 +21,8 @@ without having to worry about class/function scoping. CodeIgniter also returns a status code whenever a portion of the core calls ``exit()``. This exit status code is separate from the HTTP status code, and serves as a notice to other processes that may be watching of -whether the script completed successfully, or if not, what kind of -problem it encountered that caused it to abort. These values are +whether the script completed successfully, or if not, what kind of +problem it encountered that caused it to abort. These values are defined in *application/config/constants.php*. While exit status codes are most useful in CLI settings, returning the proper code helps server software keep track of your scripts and the health of your application. @@ -32,7 +32,7 @@ The following functions let you generate errors: show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') +.. function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -49,13 +49,13 @@ code should be sent with the error. If ``$status_code`` is less than 100, the HTTP status code will be set to 500, and the exit status code will be set to ``$status_code + EXIT__AUTO_MIN``. If that value is larger than ``EXIT__AUTO_MAX``, or if ``$status_code`` is 100 or higher, the exit -status code will be set to ``EXIT_ERROR``. You can check in +status code will be set to ``EXIT_ERROR``. You can check in *application/config/constants.php* for more detail. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) +.. function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error @@ -77,7 +77,7 @@ optional second parameter to FALSE will skip logging. log_message() ============= -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. function:: log_message($level, $message, $php_error = FALSE) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log -- cgit v1.2.3-24-g4f1b From 9228f85b1b4f59cc88ba7c4addc258a7a5fd0ac0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Feb 2014 23:40:22 +0200 Subject: [ci skip] Add return types to common and error handling functions docs --- user_guide_src/source/general/errors.rst | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'user_guide_src/source/general/errors.rst') diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index 6cc8a0966..26c26bea1 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -29,15 +29,12 @@ software keep track of your scripts and the health of your application. The following functions let you generate errors: -show_error() -============ - .. function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code :param string $heading: Error page heading - :returns: void + :rtype: void This function will display the error message supplied to it using the following error template:: @@ -52,14 +49,11 @@ be set to ``$status_code + EXIT__AUTO_MIN``. If that value is larger than status code will be set to ``EXIT_ERROR``. You can check in *application/config/constants.php* for more detail. -show_404() -========== - .. function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error - :returns: void + :rtype: void This function will display the 404 error message supplied to it using the following error template:: @@ -74,15 +68,12 @@ not found. CodeIgniter automatically logs any ``show_404()`` calls. Setting the optional second parameter to FALSE will skip logging. -log_message() -============= - .. function:: log_message($level, $message, $php_error = FALSE) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log :param bool $php_error: Whether we're logging a native PHP error message - :returns: void + :rtype: void This function lets you write messages to your log files. You must supply one of three "levels" in the first parameter, indicating what type of -- cgit v1.2.3-24-g4f1b