Fix error printing#86617
Fix error printing#86617bpasero merged 2 commits intomicrosoft:masterfrom solomatov:fix_error_printing
Conversation
bpasero
left a comment
There was a problem hiding this comment.
if exception.message is not defined, let's simply use the generic error message An unknown error occurred. Please consult the log for more details. so that we make sure that even in the verbose case, no undefined message is printed together with the stack.
|
@bpasero So, it seems that we're repeating what was in the previous PR :-) So, I think, it makes no sense to add a message. It shows a type and empty message after colon. What do you think? P.S. I can't reuse the code from spdlogService.ts as @sandy081 suggested, since we use the fact that console allow printing objects in JS representation, and thus more readable than what's available in the file logger. |
|
@bpasero Also, the error isn't unknown, it's Error, it just doesn't have a message. |
|
Thanks, I pushed one commit on top. The reason why I think we always want an error message is that these errors might be shown to users and it is not very helpful to have no information provided in that case. |
|
@bpasero That sounds great! Will check whether the error reported correctly. |
See #86405 for details