* Thrown when applying a deferred call chain on a target which is not
14
* an instance of the expected class.
15
*/
16
class BadTargetClassException extends LogicException
17
{
18
/**
19
* Constructor.
20
*
21
* @param DeferredCallChain $callchain
22
* @param mixed $expected_target The expected class
23
* @param mixed $target
24
*/
25
public function __construct(DeferredCallChain $callchain, $expected_target, $target)
26
{
27
$this->message = "You are trying to define a target of class ".get_class($target)." for the $callchain allowing only targets of class ".$expected_target;