[CSHARP-1103] Remove all occurences of FileFormatException Created: 13/Nov/14  Updated: 02/Apr/15  Resolved: 13/Nov/14

Status: Closed
Project: C# Driver
Component/s: Serialization
Affects Version/s: None
Fix Version/s: 2.0

Type: Task 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

Backwards Compatibility: Minor Change

 Description   

For accidental historical reasons we sometimes throw a FileFormatException when what we really meant to throw was usually a FormatException.

As a first step in removing all uses of FileFormatException we will simply replace all occurences with FormatException.

Later on we plan to study more carefully what exceptions can be thrown during serialization/deserialization and may make further changes. When that happens we will link this ticket to that one.

This is a backward breaking change. If you were catching FileFormatExceptions you will no longer be catching the new FormatExceptions.

However, because FileFormatException derives from FormatException, if you were catching FormatExceptions you will not have to change your code.



 Comments   
Comment by Githook User [ 13/Nov/14 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1103: Replace all occurrences of FileFormatException with FormatException.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/5b5e9f5741cc0dafe0f82c52b6163b45f1414ca2

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