While working on CScriptEngine I saw that CreateScriptEngine() has a somewhat odd catch clause:
I can't really tell where this HRESULT is thrown. All of the obvious points are already covered by the use of ShowError at those locations. Unless one of these ShowError()s is never called because an HRESULT is thrown inside the call, I can't figure out what's going on here. Any chance someone could shed some light on the matter?
catch (HRESULT hr)
{
ShowError (hr, "starting scripting support");
DisableScripting ();
return true;
}I can't really tell where this HRESULT is thrown. All of the obvious points are already covered by the use of ShowError at those locations. Unless one of these ShowError()s is never called because an HRESULT is thrown inside the call, I can't figure out what's going on here. Any chance someone could shed some light on the matter?