[CSHARP-424] When attempting to serialize an object with circular references detect that and throw a catchable exception instead of a fatal StackOverflowException Created: 30/Mar/12 Updated: 02/Apr/15 Resolved: 01/Apr/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.4 |
| Fix Version/s: | 1.4.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
A StackOverflowException can't be caught and is fatal to the process. |
| Comments |
| Comment by Robert Stam [ 01/Apr/12 ] |
|
BsonWriter now enforces a maximum serialization depth of 100 (configurable) to detect likely circular references and throws a BsonSerializationException instead of a StackOverflowException. |