mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 16:36:45 +00:00
Issue #181: Improved script error reporting for local and global scripts
This commit is contained in:
parent
d1441d79e7
commit
6a89d76321
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue