use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
use Org\Mxchange\CoreFramework\Feature\FrameworkFeature;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
use \BadMethodCallException;
use \InvalidArgumentException;
use \Iterator;
+use \LogicException;
use \UnexpectedValueException;
/**
$infoInstance = $this->getRegistryInstance()->getInfoInstanceFromPackageInstance($packageInstance);
// Test helper instance
- assert($infoInstance instanceof ShareableInfo);
+ if (is_null($infoInstance)) {
+ // Throw NPE
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } elseif (!($infoInstance instanceof ShareableInfo)) {
+ // Not the right instance
+ throw new LogicException(sprintf('infoInstance[]=%s is not an instance of %s', gettype($infoInstance), ShareableInfo::class));
+ }
// Get helper instance
$helperInstance = $infoInstance->getHelperInstance();