|
VLink 2.0.0
A high-performance communication middleware
|
VLink-specific exception types wrapping the C++ standard exception hierarchy. 更多...
#include <stdexcept>类 | |
| class | vlink::Exception::RuntimeError |
| Indicates a general runtime failure. 更多... | |
| class | vlink::Exception::OutOfRange |
| Indicates an index or iterator that is outside the valid range. 更多... | |
| class | vlink::Exception::InvalidArgument |
| Indicates that a function received an argument with an invalid value. 更多... | |
| class | vlink::Exception::LogicError |
| Indicates a violated program logic precondition. 更多... | |
| class | vlink::Exception::DomainError |
| Indicates that a value is outside the domain of a mathematical function. 更多... | |
| class | vlink::Exception::LengthError |
| Indicates an attempt to exceed the maximum allowable size or length. 更多... | |
| class | vlink::Exception::RangeError |
| Indicates an arithmetic range error. 更多... | |
| class | vlink::Exception::OverflowError |
| Indicates an arithmetic overflow. 更多... | |
| class | vlink::Exception::UnderflowError |
| Indicates an arithmetic underflow. 更多... | |
命名空间 | |
| namespace | vlink |
| namespace | vlink::Exception |
| Container namespace for all VLink exception types. | |
VLink-specific exception types wrapping the C++ standard exception hierarchy.
All VLink exception classes are thin final wrappers that inherit their constructors from the corresponding standard exception base. They are grouped inside the vlink::Exception namespace to avoid naming conflicts with application code.
The mapping between VLink exceptions and standard bases is:
| VLink exception | Standard base | Typical usage |
|---|---|---|
| Exception::RuntimeError | std::runtime_error | General runtime failures (fatal log) |
| Exception::OutOfRange | std::out_of_range | Index or iterator out of valid range |
| Exception::InvalidArgument | std::invalid_argument | Bad function argument |
| Exception::LogicError | std::logic_error | Violated precondition |
| Exception::DomainError | std::domain_error | Value outside the function domain |
| Exception::LengthError | std::length_error | Size exceeds implementation limit |
| Exception::RangeError | std::range_error | Arithmetic range error |
| Exception::OverflowError | std::overflow_error | Arithmetic overflow |
| Exception::UnderflowError | std::underflow_error | Arithmetic underflow |
Exception::RuntimeError is the exception thrown by Logger when a kFatal-level log message is emitted. If a kFatal log occurs the Logger flushes all pending output and then throws this exception, allowing the application to catch it and perform a controlled shutdown.