]> git.mxchange.org Git - friendica.git/blob - library/dddbl2/inc/exceptions/UnexpectedParameterTypeException.class.php
Merge pull request #1028 from tugelbend/master
[friendica.git] / library / dddbl2 / inc / exceptions / UnexpectedParameterTypeException.class.php
1 <?php
2
3 namespace DDDBL;
4
5 /**
6   * exception if the given parameter
7   * has an unexpected data-type
8   *
9   **/
10 class UnexpectedParameterTypeException extends \Exception {
11
12   /**
13     * @param $strExpected - the expected datatype
14     * @param $mixedValue  - the given parameter
15     *
16     * determines the datatype of the given parameter and
17     * creates and stores the exception message
18     *
19     **/
20   public function __construct($strExpected, $mixedValue) {
21
22     parent::__construct("value of type $strExpected expected, but got: " . gettype($mixedValue));
23
24   }
25
26 }