mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
initial import
This commit is contained in:
21
lib/classes/generalException.class.php
Normal file
21
lib/classes/generalException.class.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
class generalException extends Exception
|
||||
{
|
||||
public function __construct($message, $code=0)
|
||||
{
|
||||
parent::__construct($message,$code);
|
||||
$t = $this->getTrace();
|
||||
$this->file = $t[0]['file'];
|
||||
$this->line = $t[0]['line'];
|
||||
}
|
||||
public function __toString()
|
||||
{
|
||||
return 'generalException: "'.$this->message.'" in file "'.$this->file.'" at line '.$this->line."\n";
|
||||
}
|
||||
|
||||
public static function get($message = null,$code = null)
|
||||
{
|
||||
throw new generalException($message, $code);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user