File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,12 @@ public function toArray(): array
60
60
ExceptionsFieldsEnum::USER_TITLE ->value => $ this ->userTitle ,
61
61
ExceptionsFieldsEnum::LOCATION ->value => ($ this ->getFile () . ': ' . $ this ->getLine ()),
62
62
ExceptionsFieldsEnum::TRACE_ID ->value => data_get (Log::sharedContext (), 'trace_id ' ),
63
- ExceptionsFieldsEnum::PREVIOUS_MESSAGE ->value => $ this ->previous ->getMessage () ?? null ,
64
- ExceptionsFieldsEnum::PREVIOUS_TYPE ->value => $ this ->previous ::class ?? null ,
65
- ExceptionsFieldsEnum::PREVIOUS_CODE ->value => $ this ->previous ->getCode () ?? null ,
66
- ExceptionsFieldsEnum::PREVIOUS_LOCATION ->value => ($ this ->previous ->getFile () . ': ' .
67
- $ this ->previous ->getLine ()) ?? null ,
63
+ ExceptionsFieldsEnum::PREVIOUS_MESSAGE ->value => $ this ->previous ?->getMessage() ?? null ,
64
+ ExceptionsFieldsEnum::PREVIOUS_TYPE ->value => !empty ($ this ->previous ) ?
65
+ $ this ->previous ::class : null ,
66
+ ExceptionsFieldsEnum::PREVIOUS_CODE ->value => $ this ->previous ?->getCode() ?? null ,
67
+ ExceptionsFieldsEnum::PREVIOUS_LOCATION ->value => ($ this ->previous ?->getFile() . ': ' .
68
+ $ this ->previous ?->getLine()) ?? null ,
68
69
];
69
70
70
71
You can’t perform that action at this time.
0 commit comments