Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-744

Improve error messages for invalid Decimal128 and ObjectID strings

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0-alpha2, 1.2.0
    • Affects Version/s: None
    • Component/s: None
    • None

      As mentioned in PR #346, PHPC and HHVM differ in their Decimal128 exception message for an invalid string. For the ObjectID message, both drivers are consistent, but the error message is brief and does not report the invalid value.

      I propose we change these messages to the following:

      • Error parsing Decimal128 string: %s
      • Error parsing ObjectID string: %s

      HHVM currently refers to "The argument", which I'd like to remove, since this error will be common to __construct(), __set_state(), and __wakeup(). It is merely a field instead of a proper method argument for the last two functions.

            Assignee:
            derick Derick Rethans
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: