exception.getcode(3) php man page | unix.com

Man Page: exception.getcode

Operating Environment: php

Section: 3

EXCEPTION.GETCODE(3)							 1						      EXCEPTION.GETCODE(3)

Exception::getCode - Gets the Exception code

SYNOPSIS
finalpublic mixed Exception::getCode (void )
DESCRIPTION
Returns the Exception code.
PARAMETERS
This function has no parameters.
RETURN VALUES
Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOExcep- tion).
EXAMPLES
Example #1 Exception.getCode(3) example <?php try { throw new Exception("Some error message", 30); } catch(Exception $e) { echo "The exception code is: " . $e->getCode(); } ?> The above example will output something similar to: The exception code is: 30 PHP Documentation Group EXCEPTION.GETCODE(3)
Related Man Pages
template::exception(3) - suse
xml::sax::exception5.16(3) - osx
alzabo::exceptions(3pm) - debian
config::model::exception(3pm) - debian
xml::sax::exception(3pm) - debian
Similar Topics in the Unix Linux Community
Forum Video Tutorial: How to Use Code Tags
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
New Code Tags (Syntax Highlighting)
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Denial Of Service Attack Update