1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Core\Exception;
4:
5: /**
6: * @api
7: */
8: interface MultipleErrorExceptionInterface extends ExceptionInterface
9: {
10: /**
11: * Get the original exception message
12: */
13: public function getMessageWithoutErrors(): string;
14:
15: /**
16: * Get the exception's errors
17: *
18: * @return string[]
19: */
20: public function getErrors(): array;
21:
22: /**
23: * Report the exception's errors with console message level ERROR
24: *
25: * @return $this
26: */
27: public function reportErrors();
28:
29: /**
30: * Check if the exception has unreported errors
31: *
32: * This method should return `false` after
33: * {@see MultipleErrorExceptionInterface::reportErrors()} is called.
34: */
35: public function hasUnreportedErrors(): bool;
36: }
37: