See http://www.php.net/manual/en/exception.getcode.php