diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
commit | 7ddd9521b3f3a397da3b0a6b56238d31414eb4be (patch) | |
tree | 6eb6a9a51db5fa0f5d3cc2ec6de29b9e258b12a1 /engine/classes/ErrorResult.php | |
parent | bd3484417d170e62bc94e9db81d4ad37e8ddee6a (diff) | |
download | elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.gz elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.bz2 |
Standardized code in all of core, not including language files, tests, or core mods.
git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ErrorResult.php')
-rw-r--r-- | engine/classes/ErrorResult.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/engine/classes/ErrorResult.php b/engine/classes/ErrorResult.php index 739101dbb..8dbb7c13f 100644 --- a/engine/classes/ErrorResult.php +++ b/engine/classes/ErrorResult.php @@ -3,8 +3,8 @@ * ErrorResult * The error result class. * - * @package Elgg - * @subpackage Core + * @package Elgg.Core + * @subpackage WebServicesAPI */ class ErrorResult extends GenericResult { // Fail with no specific code @@ -17,12 +17,21 @@ class ErrorResult extends GenericResult { // Invalid, expired or missing auth token public static $RESULT_FAIL_AUTHTOKEN = -20; + /** + * A new error result + * + * @param string $message Message + * @param int $code Error Code + * @param Exception $exception Exception object + * + * @return void + */ public function ErrorResult($message, $code = "", Exception $exception = NULL) { if ($code == "") { $code = ErrorResult::$RESULT_FAIL; } - if ($exception!=NULL) { + if ($exception != NULL) { $this->setResult($exception->__toString()); } @@ -32,9 +41,11 @@ class ErrorResult extends GenericResult { /** * Get a new instance of the ErrorResult. * - * @param string $message - * @param int $code + * @param string $message Message + * @param int $code Code * @param Exception $exception Optional exception for generating a stack trace. + * + * @return ErrorResult */ public static function getInstance($message, $code = "", Exception $exception = NULL) { // Return a new error object. |