18 lines
450 B
PHP
18 lines
450 B
PHP
<?php
|
|
class NoneObjectCallException extends Exception
|
|
{
|
|
public function __construct($message, $code = 0)
|
|
{
|
|
parent::__construct($message, $code);
|
|
}
|
|
|
|
public function __construct($functionName, $className, $code = 0)
|
|
{
|
|
parent::__construct('You tried to call the function ' . $functionName . ' on a ' . $className . 'pointing on nothing. Try catch me the next time !', $code);
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return $this->message;
|
|
}
|
|
} |