Add numeric error code to default error message in NativeMethods.CreateException

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.8.0
    • Affects Version/s: 2.11.0
    • Component/s: Error Handling
    • None
    • Minor Change
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      The NativeMethods.CreateException method maps a known errorCode to a corresponding string, but if the errorCode is not one we know about we use the defaultMessage.

      When the defaultMessage is used this way some information is lost because we don't know what the errorCode was.

      We should append the error code to the default message, something like:

       message = defaultMessage + $" Error code {errorCode}.";
      

            Assignee:
            Kyra Ramesh Krishna
            Reporter:
            Robert Stam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: