2011-02-26 17:15:50 +00:00
|
|
|
<?php
|
2012-10-17 14:28:05 -04:00
|
|
|
|
2011-02-26 17:15:50 +00:00
|
|
|
/**
|
|
|
|
|
* HttpProxyController
|
2012-10-17 14:28:05 -04:00
|
|
|
*
|
2011-02-26 17:15:50 +00:00
|
|
|
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
|
|
|
|
* @package gulliver.system
|
|
|
|
|
* @access public
|
|
|
|
|
*/
|
|
|
|
|
class PMException extends Exception
|
|
|
|
|
{
|
2012-10-17 14:28:05 -04:00
|
|
|
|
|
|
|
|
public function __construct ($message, $code = 0, $previous = null)
|
|
|
|
|
{
|
|
|
|
|
parent::__construct( $message, 1 );
|
2011-02-26 17:15:50 +00:00
|
|
|
}
|
|
|
|
|
|
2012-10-17 14:28:05 -04:00
|
|
|
public function __toString ()
|
|
|
|
|
{
|
2011-02-26 17:15:50 +00:00
|
|
|
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
|
|
|
|
|
}
|
2016-07-27 16:37:21 -04:00
|
|
|
|
2017-08-08 14:46:01 -04:00
|
|
|
public static function registerErrorLog($error, $token){
|
2017-11-10 17:04:56 -04:00
|
|
|
$ws = (!empty(config("system.workspace")))? config("system.workspace") : "Undefined Workspace";
|
2016-08-18 17:23:40 -04:00
|
|
|
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log');
|
2016-07-27 16:37:21 -04:00
|
|
|
}
|
2012-10-17 14:28:05 -04:00
|
|
|
}
|