载入中...
搜索中...
未找到
ScriptError.cpp 文件参考
#include "common/ScriptError.h"
#include <simplesquirrel/simplesquirrel.hpp>
#include <cctype>
#include <sstream>
#include <unordered_map>
#include <utility>

浏览源代码.

命名空间

namespace  eve
 
namespace  eve::script
 

函数

ScriptErrorContext eve::script::captureScriptError (HSQUIRRELVM vm)
 Captures the pending runtime error from inside the Squirrel error handler.
 
ScriptErrorContext eve::script::captureCompileError (HSQUIRRELVM vm)
 Captures the last compilation error recorded by the VM.
 
bool eve::script::parseCompileError (const std::string &text, std::string *source, int *line, int *column, std::string *message)
 Parses the ssq compile message "Compile error at source:line:column msg".
 
std::string eve::script::sourceLineText (const std::string &sourceText, int line)
 Extracts one 1-based line from script source text.
 
std::string eve::script::formatStackTrace (const std::vector< ScriptFrame > &frames)
 Formats just the call-stack portion of a context.
 
std::string eve::script::formatScriptError (const ScriptErrorContext &ctx)
 Formats a context into a human-readable multi-line report.
 
void eve::script::setLastScriptError (HSQUIRRELVM vm, ScriptErrorContext ctx)
 Records the last error for a VM (thread-local, synchronous consumers).
 
ScriptErrorContext eve::script::takeLastScriptError (HSQUIRRELVM vm)
 Consumes and clears the last recorded error for a VM.
 
const ScriptErrorContexteve::script::peekLastScriptError (HSQUIRRELVM vm)
 Peeks at the last recorded error for a VM without clearing it.
 
void eve::script::clearLastScriptError (HSQUIRRELVM vm)
 Drops any recorded error for a VM.