public function isInstanceOf($value, $failMessage = null)
{
try {
$this->check($value, __FUNCTION__);
} catch (\logicException $exception) {
if (self::classExists($value) === false || strtolower(ltrim($value, '\\')) !== 'exception' && is_subclass_of($value, version_compare(PHP_VERSION, '7.0.0') >= 0 ? 'throwable' : 'exception') === false) {
throw new exceptions\logic\invalidArgument('Argument of ' . __METHOD__ . '() must be a \\exception instance or an exception class name');
}
}
return parent::isInstanceOf($value, $failMessage);
}