1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-30 22:17:13 +02:00

Adjust the code to use the .what() method from the Sqrat exception.

This commit is contained in:
Sandu Liviu Catalin
2016-07-09 14:18:09 +03:00
parent 862c09150f
commit 7bb0d5f947
12 changed files with 37 additions and 37 deletions

View File

@ -208,7 +208,7 @@ Int32 Controller::Run(const Guard & guard, CCStr command)
catch (const Sqrat::Exception & e)
{
// Tell the script callback to deal with the error
SqError(CMDERR_INVALID_COMMAND, e.Message().c_str(), guard.mCurrent->mInvoker);
SqError(CMDERR_INVALID_COMMAND, e.what(), guard.mCurrent->mInvoker);
// Execution failed!
return -1;
}
@ -350,7 +350,7 @@ Int32 Controller::Exec(Context & ctx)
catch (const Sqrat::Exception & e)
{
// Let's store the exception message
ctx.mBuffer.Write(0, e.Message().c_str(), e.Message().size());
ctx.mBuffer.Write(0, e.what(), e.Message().size());
// Specify that the command execution failed
failed = true;
}
@ -379,7 +379,7 @@ Int32 Controller::Exec(Context & ctx)
catch (const Sqrat::Exception & e)
{
// Let's store the exception message
ctx.mBuffer.Write(0, e.Message().c_str(), e.Message().size());
ctx.mBuffer.Write(0, e.what(), e.Message().size());
// Specify that the command execution failed
failed = true;
}