1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Providers;
12:
13: class ProviderException extends \Exception
14: {
15: /**
16: * The error messages.
17: *
18: * @var string[]
19: */
20: protected $errors;
21:
22: /**
23: * Constructor.
24: *
25: * @param string $message
26: * @param string[] $errors
27: */
28: public function __construct($message, array $errors)
29: {
30: parent::__construct($message);
31: $this->errors = $errors;
32: }
33:
34: /**
35: * Get the exception's error messages.
36: *
37: * @return string[]
38: */
39: public function getErrors()
40: {
41: return $this->errors;
42: }
43: }
44: