vezel-dev / cathode

A terminal-centric replacement for the .NET console APIs.
https://docs.vezel.dev/cathode
BSD Zero Clause License
91 stars 7 forks source link

Use `new Win32Exception(error).Message` for better exception messages in the drivers #34

Closed alexrp closed 2 years ago

alexrp commented 2 years ago

Instead of just the GetLastError/errno value.

Partially blocked by:

alexrp commented 2 years ago

Turns out we can just do new Win32Exception(err).Message on all platforms (err being the return value of e.g. Marshal.GetLastPInvokeError).