When calling ToBsonDocument() on an extension method, throw a more useful exception

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 1.3
    • Affects Version/s: 1.1
    • Component/s: None
    • Environment:
      All
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The line Console.WriteLine("A String".ToBsonDocument()); throws InvalidOperationException WriteString can only be called when State is Value, not when State is Initial. A more useful exception should be thrown higher up.

            Assignee:
            Robert Stam
            Reporter:
            Justin Dearing
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: