Skip to content

Commit

Permalink
Update AbstractTask.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane authored Oct 17, 2023
1 parent 48fe4d1 commit 3d52a2f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions webfiori/framework/scheduler/AbstractTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Exception;
use Throwable;
use webfiori\collections\Queue;
use webfiori\error\TraceEntry;
use webfiori\framework\cli\commands\SchedulerCommand;
use webfiori\framework\exceptions\InvalidCRONExprException;
use webfiori\framework\Util;
Expand Down Expand Up @@ -1504,9 +1505,15 @@ private function logExeException(Throwable $ex, string $meth = '') {
TasksManager::log('Exception message: '.$ex->getMessage());
TasksManager::log('Thrown in: '.Util::extractClassName($ex->getFile()));
TasksManager::log('Line: '.$ex->getLine());
TasksManager::log("Stack Trace:");
TasksManager::log($ex->getTraceAsString());

TasksManager::log('Stack Trace:');
$index = 0;

foreach ($ex->getTrace() as $traceEntry) {
$e = new TraceEntry($traceEntry);
TasksManager::log('#'.$index.' '.$e);
$index++;
}

if ($meth == 'execute') {
$this->isSuccess = false;
}
Expand Down

0 comments on commit 3d52a2f

Please sign in to comment.