@@ -17,62 +17,30 @@ class ChainNoResultException extends NoResultException
17
17
{
18
18
19
19
/**
20
- * Constructor
21
- *
22
- * @param string $message
23
- * @param array $exceptions Array of Exception instances
24
- * @access public
25
- * @return void
26
- */
27
- public function __construct ($ message = "" , array $ exceptions = array ())
28
- {
29
- parent ::__construct ($ message );
30
- $ this ->setExceptions ($ exceptions );
31
- }
32
-
33
- /**
34
- * exceptions
20
+ * Exceptions from chained providers
35
21
*
36
22
* @var array
37
- * @access private
38
23
*/
39
24
private $ exceptions = array ();
40
25
41
26
/**
42
- * Get the exceptions
43
- *
44
- * @access public
45
- * @return void
46
- */
47
- public function getExceptions ()
48
- {
49
- return $ this ->exceptions ;
50
- }
51
-
52
- /**
53
- * Set the exceptions
27
+ * Constructor
54
28
*
29
+ * @param string $message
55
30
* @param array $exceptions Array of Exception instances
56
- * @access public
57
- * @return void
58
31
*/
59
- public function setExceptions ( array $ exceptions )
32
+ public function __construct ( $ message = "" , array $ exceptions = array () )
60
33
{
61
- foreach ($ exceptions as $ exception ) {
62
- $ this ->addException ($ exception );
63
- }
34
+ parent ::__construct ($ message );
35
+ $ this ->exceptions = $ exceptions ;
64
36
}
65
37
66
38
/**
67
- * Add an exception
68
- *
69
- * @param Exception $exception
70
- * @access public
71
- * @return void
39
+ * Get the exceptions from chained providers
72
40
*/
73
- public function addException ( \ Exception $ exception )
41
+ public function getExceptions ( )
74
42
{
75
- $ this ->exceptions [] = $ exception ;
43
+ return $ this ->exceptions ;
76
44
}
77
45
78
46
}
0 commit comments