Error type detection fixed

This commit is contained in:
Simon Rozman 2016-08-23 22:41:12 +02:00
parent 387a12ab5e
commit a9baa07227
2 changed files with 12 additions and 12 deletions

View File

@ -91,26 +91,26 @@ EAP_ERROR* eap::module::make_error(_In_ std::exception &err) const
MultiByteToWideChar(CP_ACP, 0, err.what(), -1, what);
{
win_runtime_error &e(dynamic_cast<win_runtime_error&>(err));
if (&e)
return make_error(e.number(), what.c_str());
win_runtime_error *e = dynamic_cast<win_runtime_error*>(&err);
if (e)
return make_error(e->number(), what.c_str());
}
{
com_runtime_error &e(dynamic_cast<com_runtime_error&>(err));
if (&e)
return make_error(HRESULT_CODE(e.number()), what.c_str());
com_runtime_error *e = dynamic_cast<com_runtime_error*>(&err);
if (e)
return make_error(HRESULT_CODE(e->number()), what.c_str());
}
{
sec_runtime_error &e(dynamic_cast<sec_runtime_error&>(err));
if (&e)
return make_error(SCODE_CODE(e.number()), what.c_str());
sec_runtime_error *e = dynamic_cast<sec_runtime_error*>(&err);
if (e)
return make_error(SCODE_CODE(e->number()), what.c_str());
}
{
invalid_argument &e(dynamic_cast<invalid_argument&>(err));
if (&e)
invalid_argument *e = dynamic_cast<invalid_argument*>(&err);
if (e)
return make_error(ERROR_INVALID_PARAMETER, what.c_str());
}

@ -1 +1 @@
Subproject commit f94b72379ec67fad89a99336048890c4e7ddda34
Subproject commit 986762649ff433b5f4321b805239fcd8f4da17f5