Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def layout(self):
self.folders.generators = os.path.join(self.folders.build, "generators")

def requirements(self):
self.requires("angelscript/2.37.0")
self.requires("angelscript/2.38.0")
self.requires("jsoncpp/1.9.5")
self.requires("openssl/3.3.2", override=True)
self.requires("socketw/3.11.0@anotherfoxguy/stable")
Expand Down
8 changes: 6 additions & 2 deletions source/server/ScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,14 @@ int ScriptEngine::loadScript(std::string scriptname) {

void ScriptEngine::ExceptionCallback(asIScriptContext *ctx, void *param) {
const asIScriptFunction *function = ctx->GetExceptionFunction();
const char *sectionName;
int s_col, s_row;
function->GetDeclaredAt(&sectionName, &s_row, &s_col);
Logger::Log(LOG_INFO, "--- exception ---");
Logger::Log(LOG_INFO, "desc: %s", ctx->GetExceptionString());
Logger::Log(LOG_INFO, "func: %s", function->GetDeclaration());
Logger::Log(LOG_INFO, "modl: %s", function->GetModuleName());
Logger::Log(LOG_INFO, "sect: %s", function->GetScriptSectionName());
Logger::Log(LOG_INFO, "sect: %s (%d,%d)", sectionName, s_col, s_row);
int col, line = ctx->GetExceptionLineNumber(&col);
Logger::Log(LOG_INFO, "line: %d,%d", line, col);

Expand All @@ -240,7 +243,8 @@ void ScriptEngine::ExceptionCallback(asIScriptContext *ctx, void *param) {
char tmp[2048] = "";
for (asUINT n = 0; n < ctx->GetCallstackSize(); n++) {
function = ctx->GetFunction(n);
sprintf(tmp, "%s (%d): %s", function->GetScriptSectionName(), ctx->GetLineNumber(n),
function->GetDeclaredAt(&sectionName, &s_row, &s_col);
sprintf(tmp, "%s (%d): %s", sectionName, ctx->GetLineNumber(n),
function->GetDeclaration());
Logger::Log(LOG_INFO, tmp);
PrintVariables(ctx, n);
Expand Down
Loading