Converted Exception messages to be more meaningful.

This commit is contained in:
Abdulmhsen B. A. A
2023-12-10 20:21:43 +03:00
parent 5f583fcd45
commit 8d9ae2a10b
23 changed files with 367 additions and 92 deletions

View File

@@ -397,8 +397,14 @@ class ExportCommand extends Command
$this->logger->notice('Marked [{backend}] [{item.title}] as [{play_state}].', $context);
} catch (Throwable $e) {
$this->logger->error(
'Unhandled exception thrown during request to change play state of [{backend}] {item.type} [{item.title}].',
[
message: 'Exception [{error.kind}] was thrown unhandled during [{backend}] request to change play state of {item.type} [{item.title}]. Error [{error.message} @ {error.file}:{error.line}].',
context: [
'error' => [
'kind' => $e::class,
'line' => $e->getLine(),
'message' => $e->getMessage(),
'file' => after($e->getFile(), ROOT_PATH),
],
...$context,
'exception' => [
'file' => $e->getFile(),