-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 0.0.1
-
Component/s: None
-
None
Currently, when *bson.Document is nil and we call methods on it, strange things happen, like panics during validation. For the methods of bson.Document that have a pointer receiver, add a check to ensure that the document itself is not nil and if it is either panic or return an error.
For certain cases (like printing out the Document), we may want to print "<nil>" instead of return an error, or some other representation of a nil Document.