Warning
Warning message class with formatted output.
Defined in Rodin/Alert/Warning.h
class Warning;
A specialized message class for displaying warnings with yellow-colored formatting. Unlike exceptions, warning messages do not terminate the program and are used to notify users of potential issues or unusual conditions that don't prevent execution.
The Warning class provides stream-like insertion operators for building detailed warning messages with formatting capabilities.
Example usage: Warning() << "This operation is deprecated" << Raise;
Inherits from
| Base class | Responsibility |
|---|---|
Message<WarningPrefix>publicFull typeMessage< WarningPrefix > | Forward declaration of the Message template class. |
Derived classes
| Derived class | Description |
|---|---|
MemberFunctionWarning<T, FuncName>publicFull typeMemberFunctionWarning< T, FuncName > | Warning type for issues occurring in member functions. |
Inherited interface
| Declared in | Members |
|---|---|
Message |
Public types
- using Parent = Message<WarningPrefix>
- Parent class type alias.
Constructors, destructors, conversion operators
Function documentation
Warning()
Constructs a Warning alert with an empty message.
Creates a warning message that outputs to std::cout by default.
Warning(std::ostream& os)
Constructs a Warning alert with a specific output stream.
| Parameters | |
|---|---|
| os | The output stream to write the warning message to. |