Throwable::getCode Gets the exception code &reftitle.description; public intThrowable::getCode Returns the error code associated with the thrown object. &reftitle.parameters; &no.function.parameters; &reftitle.returnvalues; Returns the exception code as int in Exception but possibly as other type in Exception descendants (for example as string in PDOException). &reftitle.seealso; Exception::getCode