/** * Creates a new instance of CategoryException. * * @param string $location The location of the exception throwing regarding the MVC pattern. * @param string $message A computer scientist readable description of the error. * @param Exception $parentException The exception which is the cause of the error (not mandatory). * @param integer $code A code that represents a subtype of the exception. */ public function __construct($location, $message, Exception $parentException = null, $code = null) { if (!$code) { $code = self::UNKNOWN; } parent::__construct($location, $message, $parentException, $code); }
/** * Creates a new instance of XMLException. * * @param string $loc The location of the exception in an MVC context. * @param string $xmlFile The name of the problematic XML file. * @param Exception $parentException An exception which is the cause of this one (not mandatory). */ public function __construct($loc, $xmlFile, $message, Exception $parentException = NULL) { if ($xmlFile != NULL && $xmlFile != '') { $message = $xmlFile . ': ' . $message; } parent::__construct($loc, $message, $parentException); }
/** * Creates a new instance of ServiceException. * * @param string $loc The location of the exception in an MVC context. * @param string $service The name of the concerned service. * @param string $message The message. Predefined messages of the class can be used. * @param Exception $parentException An exception which is the cause of this one (not mandatory). */ public function __construct($loc, $service, $message, Exception $parentException = NULL) { if ($service != NULL && $service != '') { $message = 'Problem with the service ' . $service . ': ' . $message; } else { $message = 'Problem with a service: ' . $message; } parent::__construct($loc, $message, $parentException); }
/** * Creates a new instance of PluginException. * * @param string $loc Localisation of the exception in the MVC framework: MODEL, VIEW, or ACTION. * @param string $message A computer scientist readable reason of the exception. * @param Exception $parentException An exception which is the cause of this one (not mandatory). */ public function __construct($loc, $message, Exception $parentException = null) { parent::__construct($loc, $message, $parentException); }