diff --git a/lib/Exceptions/ValidationException.php b/lib/Exceptions/ValidationException.php index 119a1b0e..32b1701a 100644 --- a/lib/Exceptions/ValidationException.php +++ b/lib/Exceptions/ValidationException.php @@ -1,26 +1,19 @@ Add($exception); - } - } - public function __toString(): string{ $output = ''; + foreach($this->Exceptions as $exception){ - $output .= $exception->getMessage() . '; '; + $output .= $exception->getMessage() . "\n"; } - return rtrim($output, '; '); + return rtrim($output); } public function Add(\Exception $exception, bool $isFatal = false): void{ @@ -40,17 +33,6 @@ class ValidationException extends SeException{ $this->HasExceptions = true; } - public function Serialize(): string{ - $val = ''; - foreach($this->Exceptions as $childException){ - $val .= $childException->getCode() . ','; - } - - $val = rtrim($val, ','); - - return $val; - } - public function Has(string $exception): bool{ foreach($this->Exceptions as $childException){ if(is_a($childException, $exception)){