for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Jarrett;
use \Exception;
/**
* Class HughesException
* @package HughesApi\Exception
*/
class RockPaperScissorsSpockLizardException extends Exception
{
// Redefine the exception so message isn't optional
public function __construct($message, $code = 0, Exception $previous = null)
// make sure everything is assigned properly
parent::__construct($message, $code, $previous);
}
// custom string representation of object
public function __toString()
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";