MiksIr
miksir@home:~$
PDOException extends RuntimeException
RuntimeException extends Exception
Но в Exception: protected int $code ;
а в PDOException: protected string $code ;
А еще смотрим на конструктор public __construct ([ string $message = "" [, int $code = 0 [, Exception $previous = NULL ]]] )
И как результат:
catch (PDOException $e ) { throw new PDOException($e->getMessage(), $e->getCode()); }
Вызывает фатал.
Равно как и любой другой throw new ... наследованный от Exception
=(
RuntimeException extends Exception
Но в Exception: protected int $code ;
а в PDOException: protected string $code ;
А еще смотрим на конструктор public __construct ([ string $message = "" [, int $code = 0 [, Exception $previous = NULL ]]] )
И как результат:
catch (PDOException $e ) { throw new PDOException($e->getMessage(), $e->getCode()); }
Вызывает фатал.
Равно как и любой другой throw new ... наследованный от Exception
=(