Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -25,8 +25,8 @@ class _Exception extends \RuntimeException
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Task $task The task with the issue
|
||||
* @param string $message Error Message
|
||||
* @param \IPS\Task $task The task with the issue
|
||||
* @param string|array $message Error Message
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Task $task, $message )
|
||||
@@ -34,6 +34,12 @@ class _Exception extends \RuntimeException
|
||||
$task->running = FALSE;
|
||||
$task->next_run = \IPS\DateTime::create()->add( new \DateInterval( $task->frequency ) )->getTimestamp();
|
||||
$task->save();
|
||||
|
||||
/* Exception message must be a string */
|
||||
if( is_array( $message ) )
|
||||
{
|
||||
$message = json_encode( $message );
|
||||
}
|
||||
|
||||
return parent::__construct( $message );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user