Files
VestaCP/web/vesta/core/exceptions/ProtectionException.class.php

35 lines
621 B
PHP
Raw Normal View History

2011-06-14 00:22:25 +03:00
<?php
/**
* Protection exception
*
* Thrown if unexpected action or behaviour detected
*
* @author Malishev Dima <dima.malishev@gmail.com>
2011-06-14 00:22:25 +03:00
* @author vesta, http://vestacp.com/
* @copyright vesta 2010-2011
2011-06-14 00:22:25 +03:00
*/
class ProtectionException extends Exception
{
2011-06-14 00:22:25 +03:00
const CODE_GENERAL = 0;
2011-06-21 13:32:26 +03:00
/**
* Protection exception
*/
public function __construct($message, $code=self::CODE_GENERAL, $previous=null)
{
2011-06-14 00:22:25 +03:00
parent::__construct($message, $code, $previous);
}
2011-06-21 13:32:26 +03:00
/**
* Renders error message
*/
public function __toString()
{
2011-06-14 00:22:25 +03:00
print $this->message;
}
}
?>