1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-02 16:36:45 +00:00

Issue : Improved script error reporting for local and global scripts

This commit is contained in:
Marc Zinnschlag 2012-06-16 11:52:35 +02:00
parent d1441d79e7
commit 6a89d76321

View file

@ -11,6 +11,7 @@
#include <components/compiler/scanner.hpp> #include <components/compiler/scanner.hpp>
#include <components/compiler/context.hpp> #include <components/compiler/context.hpp>
#include <components/compiler/exception.hpp>
#include "extensions.hpp" #include "extensions.hpp"
@ -46,8 +47,13 @@ namespace MWScript
if (!mErrorHandler.isGood()) if (!mErrorHandler.isGood())
Success = false; Success = false;
} }
catch (...) catch (const Compiler::SourceException&)
{ {
// error has already been reported via error handler
}
catch (const std::exception& error)
{
std::cerr << "An exception has been thrown: " << error.what() << std::endl;
Success = false; Success = false;
} }