Files
luos/gulliver/system/class.pmException.php
Paula Quispe 5beb7623b3 HOR-4070
2017-11-13 11:19:23 -04:00

28 lines
741 B
PHP

<?php
/**
* HttpProxyController
*
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
* @package gulliver.system
* @access public
*/
class PMException extends Exception
{
public function __construct ($message, $code = 0, $previous = null)
{
parent::__construct( $message, 1 );
}
public function __toString ()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
public static function registerErrorLog($error, $token){
$ws = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log');
}
}