1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
<?php
namespace esperecyan\webidl\lib;
/** @internal */
trait Error
{
/**
* @param string $message The exception message to throw,
* which is an optional, that provides human readable details of the exception.
* @param \Exception $previous The previous exception used for the exception chaining.
*/
public function __construct($message = '', \Exception $previous = null)
{
parent::__construct($message, 0, $previous);
$this->code = $this->name = (new \ReflectionClass(__CLASS__))->getShortName();
}
}