Throwable::getCode 获取异常代码 &reftitle.description; public intThrowable::getCode 返回 thrown 对象关联的的错误号。 &reftitle.parameters; &no.function.parameters; &reftitle.returnvalues; 返回 Exceptionint 异常代码, 但如果是 Exception 的子类,可能会使其他类型(例如,PDOException 返回的类型是 string )。 &reftitle.seealso; Exception::getCode