Exiting with 1 when Exception::getCode() returns non-integer values.

From php.net/exception.getcode
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
Merge pull request #3809 from renan/2.5-non-integer-exception-code

Exiting with 1 when Exception::getCode() returns non-integer values.
cs correction
Fix identifier typos