RMVL  1.4.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::Exception类 参考final

该类封装了有关程序中发生的错误的所有或几乎所有必要信息。异常通常是通过 RMVL_Error 和 RMVL_Error_ 宏隐式构造和抛出的 更多...

#include <rmvl/core/util.hpp>

类 rm::Exception 继承关系图:
rm::Exception 的协作图:

Public 成员函数

 Exception ()
 默认构造
 
 Exception (int _code, std::string_view _err, std::string_view _func, std::string_view _file, int _line)
 完整的构造函数。通常不显式调用构造函数。而是使用宏 RMVL_Error()RMVL_Error_()RMVL_Assert()
 
virtual ~Exception () noexcept=default
 
const char * what () const noexcept override
 

Public 属性

std::string msg
 格式化的错误信息
 
int code
 错误码
 
std::string err
 错误描述
 
std::string func
 函数名,仅在编译器支持获取时可用
 
std::string file
 发生错误的源文件名
 
int line
 源文件中发生错误的行号
 

详细描述

该类封装了有关程序中发生的错误的所有或几乎所有必要信息。异常通常是通过 RMVL_Error 和 RMVL_Error_ 宏隐式构造和抛出的

参见
error

构造及析构函数说明

◆ Exception() [1/2]

rm::Exception::Exception ( )
inline

默认构造

◆ Exception() [2/2]

rm::Exception::Exception ( int _code,
std::string_view _err,
std::string_view _func,
std::string_view _file,
int _line )

完整的构造函数。通常不显式调用构造函数。而是使用宏 RMVL_Error()RMVL_Error_()RMVL_Assert()

◆ ~Exception()

virtual rm::Exception::~Exception ( )
virtualdefaultnoexcept

成员函数说明

◆ what()

const char * rm::Exception::what ( ) const
inlineoverridenoexcept
返回
错误描述和上下文作为文本字符串

类成员变量说明

◆ code

int rm::Exception::code

错误码

参见
RMVLErrorCode

◆ err

std::string rm::Exception::err

错误描述

◆ file

std::string rm::Exception::file

发生错误的源文件名

◆ func

std::string rm::Exception::func

函数名,仅在编译器支持获取时可用

◆ line

int rm::Exception::line

源文件中发生错误的行号

◆ msg

std::string rm::Exception::msg

格式化的错误信息


该类的文档由以下文件生成: