载入中...
搜索中...
未找到
ScriptError.h 文件参考
#include "common/Export.h"
#include <squirrel.h>
#include <string>
#include <vector>

浏览源代码.

struct  eve::script::ScriptFrame
 One call-stack frame captured while the script error is still live. 更多...
 
struct  eve::script::ScriptErrorContext
 Structured snapshot of a script error: message, throw site and stack. 更多...
 

命名空间

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::formatScriptError (const ScriptErrorContext &ctx)
 Formats a context into a human-readable multi-line report.
 
std::string eve::script::formatStackTrace (const std::vector< ScriptFrame > &frames)
 Formats just the call-stack portion of a context.
 
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.