Example #1
0
 public function __construct($message = NULL, $code = 500)
 {
     parent::__construct($message, $code);
 }
Example #2
0
 function __construct($errors = array())
 {
     if (!is_array($errors) and !$errors instanceof WFErrorArray) {
         throw new WFException("WFErrorsException requires an array of WFError objects, was passed: " . $errors);
     }
     if (!$errors instanceof WFErrorArray) {
         $errors = new WFErrorArray($errors);
     }
     $this->errors = $errors;
     $message = '';
     if ($this->errors) {
         $message = join(',', $this->errors->valueForKeyPath('allErrors.errorMessage'));
     }
     parent::__construct($message);
 }