Tidy up some use of Error for throw

This commit is contained in:
Vinnie Falco
2013-09-28 18:15:00 -07:00
parent e5e0f527fe
commit 4394594518
13 changed files with 34 additions and 75 deletions

View File

@@ -34,10 +34,6 @@ namespace vf
namespace
{
//
// While this object is in scope, any Windows SEH
// exceptions will be caught and re-thrown as an Error object.
//
class ScopedPlatformExceptionCatcher : public Uncopyable
{
public:
@@ -155,7 +151,7 @@ public:
break;
}
Throw (Error ().fail (__FILE__, __LINE__, s, Error::platform));
beast_reportFatalError (s, __FILE__, __LINE__);
}
return s_sehPrev (ei);
@@ -218,26 +214,6 @@ bool CatchAny (Function <void (void)> f, bool returnFromException)
caughtException = false;
}
catch (Error& e)
{
if (!returnFromException)
{
JUCEApplication* app = JUCEApplication::getInstance ();
if (app)
{
app->unhandledException (
&e,
e.getSourceFilename (),
e.getLineNumber ());
}
else
{
std::cout << e.what ();
std::unexpected ();
}
}
}
catch (std::exception& e)
{
if (!returnFromException)