载入中...
搜索中...
未找到
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< ScriptFramestack
 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.h25 行定义.

成员函数说明

◆ empty()

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

True when no error payload was captured.

在文件 ScriptError.h36 行定义.

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

类成员变量说明

◆ column

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

1-based column (compile errors only).

在文件 ScriptError.h30 行定义.

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

◆ function

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

Function of the throwing frame.

在文件 ScriptError.h28 行定义.

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

◆ hint

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

Optional source snippet shown under the message.

在文件 ScriptError.h31 行定义.

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

◆ line

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

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

在文件 ScriptError.h29 行定义.

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

◆ message

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

Raw error value ("kaboom", "42", ...).

在文件 ScriptError.h26 行定义.

被这些函数引用 eve::script::captureCompileError(), eve::script::captureScriptError(), eve::Runtime::execute() , 以及 eve::script::formatScriptError().

◆ reported

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

True when a reporter already handled this error.

在文件 ScriptError.h33 行定义.

◆ source

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

Source of the throwing frame.

在文件 ScriptError.h27 行定义.

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

◆ stack

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

Call stack, innermost frame first.

在文件 ScriptError.h32 行定义.

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


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