Add missing dt() in exception catch

Created on 22 December 2023, 12 months ago

How it is now

catch (\Exception $e) {
  $this->logger()->error("An error occurred during file generation: @error", ['@error' => $e->getMessage()]);
}

leads to:

[error] An error occurred during file generation: @error

How it should be changed

catch (\Exception $e) {
  $this->logger()->error(dt("An error occurred during file generation: @error", ['@error' => $e->getMessage()]));
}

and I can read the error (coming from a different module that needs its own fix in the different module):

[error] An error occurred during file generation: The Gitlab url is not defined.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

leymannx Berlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024