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

Improve error messages for invalid Decimal128 and ObjectID strings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 1.2.0-alpha2
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: