What is the best way to handle a specific Win32 Exception like “application not found”?

前端 未结 2 1762
野的像风
野的像风 2021-01-26 07:58

I start a process with the default application for the file type, but if the user has deleted his default application, a Win32Exception is thrown. In addition there are other ca

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-26 08:25

    Win32Exception has a property called ErrorCode, that returns the error HRESULT. With this, you can properly classify your exception, according to this link here.

提交回复
热议问题