mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Prevent silent failure uppon loading scripts that don't exist.
This commit is contained in:
@ -27,7 +27,7 @@ public:
|
||||
{
|
||||
if (!mFile)
|
||||
{
|
||||
throw std::runtime_error(ToStrF("Unable to open script source (%s)", path));
|
||||
STHROWF("Unable to open script source (%s)", path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,9 +151,9 @@ void ScriptSrc::Process()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ScriptSrc::ScriptSrc(HSQUIRRELVM vm, String && path, bool delay, bool info)
|
||||
ScriptSrc::ScriptSrc(HSQUIRRELVM vm, const String & path, bool delay, bool info)
|
||||
: mExec(vm)
|
||||
, mPath(std::move(path))
|
||||
, mPath(path)
|
||||
, mData()
|
||||
, mLine()
|
||||
, mInfo(info)
|
||||
|
@ -39,16 +39,7 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Base constructor.
|
||||
*/
|
||||
ScriptSrc(HSQUIRRELVM vm, const String & path, bool delay = false, bool info = false)
|
||||
: ScriptSrc(vm, String(path), delay, info)
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Base constructor.
|
||||
*/
|
||||
ScriptSrc(HSQUIRRELVM vm, String && path, bool delay = false, bool info = false);
|
||||
ScriptSrc(HSQUIRRELVM vm, const String & path, bool delay = false, bool info = false);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy constructor.
|
||||
|
Reference in New Issue
Block a user