mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-27 03:11:28 +00:00
User/xianz/ortthrow (#2599)
* thrown and handle onnxruntime exceptions * handle exception thrown from ort in winmladapter * undo changes in error.h * add message to HRESULT * add status error message
This commit is contained in:
parent
36e557ec12
commit
352c58d1b9
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ inline __declspec(noinline) winrt::hresult_error _winmla_to_hresult() noexcept {
|
|||
return winrt::hresult_invalid_argument(winrt::to_hstring(e.what()));
|
||||
} catch (onnxruntime::OnnxRuntimeException const& e) {
|
||||
StatusCode eStatusCode = static_cast<StatusCode>(e.GetStatus().Code());
|
||||
return winrt::hresult_error(StatusCodeToHRESULT(eStatusCode), winrt::to_hstring(e.what()));
|
||||
return winrt::hresult_error(StatusCodeToHRESULT(eStatusCode), winrt::to_hstring(e.GetStatus().ErrorMessage()));
|
||||
} catch (std::exception const& e) {
|
||||
return winrt::hresult_error(E_FAIL, winrt::to_hstring(e.what()));
|
||||
} catch (...) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue