Skip to content

Commit 5963682

Browse files
fix: catch \Throwable in gluonInitDependency() to handle Error and TypeError
Agent-Logs-Url: https://github.com/Starisian-Technologies/sparxstar-gluon/sessions/862d607d-e0f3-46f1-bbdd-7b437333e1c0 Co-authored-by: MaximillianGroup <34328348+MaximillianGroup@users.noreply.github.com>
1 parent 2104273 commit 5963682

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/SparxstarGluonOrchestrator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
namespace Starisian\Sparxstar\Gluon;
2020

2121
use Starisian\Sparxstar\Gluon\helpers\loggers\SparxstarGluonLogger as Logger;
22-
use Exception;
2322

2423
// Exit if accessed directly.
2524
if ( ! defined( 'ABSPATH' ) ) {
@@ -196,7 +195,7 @@ private function gluonInitDependency( string $dependency ): void {
196195
} else {
197196
$this->dependencies[ $dependency ] = new $dependency();
198197
}
199-
} catch ( Exception $e ) {
198+
} catch ( \Throwable $e ) {
200199
Logger::log( 'SPARXSTAR Gluon: Failed to instantiate ' . $dependency . ': ' . $e->getMessage() );
201200
}
202201
}

0 commit comments

Comments
 (0)