Put a breakpoint in your code where the error message is being retrieved, and inspect the raw string in your debugger of choice. It looks like the throwing of exceptions may be complicating the retrieval of the error string.
Ah I see, I need to install windows SDK for windows 10. Silly me.
Okay, I installed windows SDK 10 but it still didn't work. Let me keep trying.