for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Thruster\Component\PacketHandler\Exception;
use Exception;
/**
* Class InvalidPackageReceivedException
*
* @package Thruster\Component\PacketHandler\Exception
* @author Aurimas Niekis <[email protected]>
*/
class InvalidPackageReceivedException extends \Exception
{
* @inheritDoc
public function __construct($package)
if (is_object($package)) {
$message = sprintf(
'Received object of class "%s" instead of Package',
get_class($package)
);
} else {
'Received "%s" instead of object of Package',
gettype($package)
}
parent::__construct($message);