Skip to content

Commit

Permalink
fix: update try/catch block in Worker so it catches both Exceptions a…
Browse files Browse the repository at this point in the history
…nd Errors.

build: [release]
  • Loading branch information
lots0logs committed Nov 20, 2024
1 parent 299b88b commit d36d69f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ public function run() {
if ( $this->_jobs ) {
try {
$this->_doJobs();
} catch ( \Exception $err ) {
} catch ( \Throwable $err ) {
et_error( $err->getMessage() );
}
}

} catch ( \ErrorException $err ) {
// Keep trying until our lock expires
} catch ( \Throwable $err ) {
et_error( $err->getMessage() );
}
}

Expand Down

0 comments on commit d36d69f

Please sign in to comment.