[CSHARP-4082] Include stack trace when unexpected exception thrown displaying MongoQuery Created: 02/Mar/22  Updated: 28/Oct/23  Resolved: 02/Mar/22

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: 2.14.1
Fix Version/s: 2.15.0

Type: Improvement Priority: Unknown
Reporter: James Kovacs Assignee: James Kovacs
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CSHARP-3615
Backwards Compatibility: Minor Change

 Description   

If an exception is thrown calling MongoQuery.ToString(), only the error message is displayed, not the stack trace. If the exception is expected - like ExpressionNotSupportedException - then only displaying the message is the correct behaviour. But if some unexpected problem occurs - such as not being able to resolve the correct serializer - a full stack trace would be helpful in diagnosing the issue.



 Comments   
Comment by Githook User [ 02/Mar/22 ]

Author:

{'name': 'James Kovacs', 'email': 'jkovacs@post.harvard.edu', 'username': 'JamesKovacs'}

Message: CSHARP-4082: Include full stack trace when LINQ3 MongoQuery.ToString() encounters an unexpected exception. (#737)
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/53a2b1f75719091aed728b4870c289a1ae4b70d0

Generated at Wed Feb 07 21:47:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.