1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 12:39:53 +00:00

Issue #181: 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/context.hpp>
#include <components/compiler/exception.hpp>
#include "extensions.hpp"
@ -46,8 +47,13 @@ namespace MWScript
if (!mErrorHandler.isGood())
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;
}