Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Call / Exception / BadCallbackException.php
1 <?php
2
3 /*
4  * This file is part of the Behat Testwork.
5  * (c) Konstantin Kudryashov <ever.zet@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 Behat\Testwork\Call\Exception;
12
13 use InvalidArgumentException;
14
15 /**
16  * Represents exception caused by a bad callback.
17  *
18  * @author Konstantin Kudryashov <ever.zet@gmail.com>
19  */
20 final class BadCallbackException extends InvalidArgumentException implements CallException
21 {
22     /**
23      * @var callable
24      */
25     private $callable;
26
27     /**
28      * Initializes exception.
29      *
30      * @param string   $message
31      * @param callable $callable
32      */
33     public function __construct($message, $callable)
34     {
35         $this->callable = $callable;
36
37         parent::__construct($message);
38     }
39
40     /**
41      * Returns callback that caused exception.
42      *
43      * @return callable
44      */
45     public function getCallable()
46     {
47         return $this->callable;
48     }
49 }