sasori Posted August 16, 2008 Share Posted August 16, 2008 i saw this code snippet from the book that im reading i don't understand what that 0000 means (from the the argument of the constructor of the Exception class, and also i don't know what the Exception class contains) <?php class PGSQLConnection extends Exception { $message = "Sorry cannot connect to PostgreSQL server"; parent::__construct($message,0000); } ?> Link to comment https://forums.phpfreaks.com/topic/119918-solved-argument-in-exception-help/ Share on other sites More sharing options...
corbin Posted August 16, 2008 Share Posted August 16, 2008 http://php.net/exception The second parameter is the 'code'. Link to comment https://forums.phpfreaks.com/topic/119918-solved-argument-in-exception-help/#findComment-617866 Share on other sites More sharing options...
sasori Posted August 16, 2008 Author Share Posted August 16, 2008 http://php.net/exception The second parameter is the 'code'. does it have to be always a 4 digit number ? Link to comment https://forums.phpfreaks.com/topic/119918-solved-argument-in-exception-help/#findComment-617868 Share on other sites More sharing options...
448191 Posted August 16, 2008 Share Posted August 16, 2008 public __construct ([ string $message [, int $code ]] ) It has to be an integer. Link to comment https://forums.phpfreaks.com/topic/119918-solved-argument-in-exception-help/#findComment-617967 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.