载入中...
搜索中...
未找到
eve::script::ScriptErrorContext结构体 参考

Structured snapshot of a script error: message, throw site and stack. 更多...

#include <ScriptError.h>

Public 成员函数

bool empty () const noexcept
 True when no error payload was captured.
 

Public 属性

std::string message
 Raw error value ("kaboom", "42", ...).
 
std::string source
 Source of the throwing frame.
 
std::string function
 Function of the throwing frame.
 
int line = -1
 1-based throw-site line; -1 when unknown.
 
int column = -1
 1-based column (compile errors only).
 
std::string hint
 Optional source snippet shown under the message.
 
std::vector< ScriptFrame > stack
 Call stack, innermost frame first.
 
bool reported = false
 True when a reporter already handled this error.
 

详细描述

Structured snapshot of a script error: message, throw site and stack.

Captured from inside the Squirrel error handler while the native call stack is still intact, so the throw-site line and every caller frame are known.

在文件 ScriptError.h 第 25 行定义.

成员函数说明

◆ empty()

bool eve::script::ScriptErrorContext::empty ( ) const
inlinenoexcept

True when no error payload was captured.

在文件 ScriptError.h 第 36 行定义.

引用了 message.

被这些函数引用 eve::Runtime::createInstance(), eve::dev::ConsolePanel::eval(), eve::dev::Debugger::evaluate(), eve::Runtime::execute() , 以及 eve::script::formatLastScriptError().

类成员变量说明

◆ column

int eve::script::ScriptErrorContext::column = -1

1-based column (compile errors only).

在文件 ScriptError.h 第 30 行定义.

被这些函数引用 eve::script::captureCompileError().

◆ function

std::string eve::script::ScriptErrorContext::function

Function of the throwing frame.

在文件 ScriptError.h 第 28 行定义.

被这些函数引用 eve::script::captureScriptError(), eve::script::formatScriptError() , 以及 eve::dev::DevTool::notifyError().

◆ hint

std::string eve::script::ScriptErrorContext::hint

Optional source snippet shown under the message.

在文件 ScriptError.h 第 31 行定义.

被这些函数引用 eve::script::formatScriptError().

◆ line

int eve::script::ScriptErrorContext::line = -1

1-based throw-site line; -1 when unknown.

在文件 ScriptError.h 第 29 行定义.

被这些函数引用 eve::script::captureCompileError(), eve::script::captureScriptError(), eve::script::formatScriptError() , 以及 eve::dev::DevTool::notifyError().

◆ message

std::string eve::script::ScriptErrorContext::message

◆ reported

bool eve::script::ScriptErrorContext::reported = false

True when a reporter already handled this error.

在文件 ScriptError.h 第 33 行定义.

◆ source

std::string eve::script::ScriptErrorContext::source

◆ stack

std::vector<ScriptFrame> eve::script::ScriptErrorContext::stack

Call stack, innermost frame first.

在文件 ScriptError.h 第 32 行定义.

被这些函数引用 eve::script::captureScriptError(), eve::script::formatScriptError() , 以及 eve::dev::DevTool::notifyError().


该结构体的文档由以下文件生成: