123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- class ConfigurationException extends Exception {
-
- protected $location;
-
- protected $cause;
-
- function __construct($p1, $p2 = null, $p3 = null) {
- $cause = null;
- $msg = "";
- if ($p2 !== null) {
- if ($p2 instanceof Exception) {
- $cause = $p2;
- $msg = $p1;
- }
- } elseif ($p1 instanceof Exception) {
- $cause = $p1;
- } else {
- $msg = $p1;
- }
- parent::__construct($msg);
- if ($cause !== null) {
- $this->cause = $cause;
- $this->message .= " [wrapped: " . $cause->getMessage() ."]";
- }
- }
-
-
- public function getCause() {
- return $this->cause;
- }
-
- }
|