1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Contract\Core\Exception; |
4: | |
5: | use Salient\Contract\Console\ConsoleInterface as Console; |
6: | |
7: | /** |
8: | * @api |
9: | */ |
10: | interface MultipleErrorException extends Exception |
11: | { |
12: | /** |
13: | * Get the exception's message without errors |
14: | */ |
15: | public function getMessageOnly(): string; |
16: | |
17: | /** |
18: | * Get the exception's errors |
19: | * |
20: | * @return string[] |
21: | */ |
22: | public function getErrors(): array; |
23: | |
24: | /** |
25: | * Report the exception's errors as console messages with level ERROR or |
26: | * higher |
27: | */ |
28: | public function reportErrors(Console $console): void; |
29: | |
30: | /** |
31: | * Check if the exception has unreported errors |
32: | */ |
33: | public function hasUnreportedErrors(): bool; |
34: | } |
35: |