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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.11.0
    • Component/s: Error Handling
    • None
    • None
    • 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:
              Unassigned
              Reporter:
              Robert Stam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: