libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
error.cxx
1// cosmos
2#include <cosmos/formatting.hxx>
3
4// clues
5#include <clues/items/error.hxx>
6#include <clues/utils.hxx>
7
8namespace clues::item {
9
10std::string SuccessResult::str() const {
11 if (valid()) {
12 return "0";
13 } else {
14 return cosmos::sprintf("%d (\?\?\?)", valueAs<int>());
15 }
16}
17
18} // end ns
OTHER valueAs() const
Helper to cast the strongly typed Word m_val to other strong enum types.
bool valid() const
Checks whether the success value actually is a success value.
Definition error.hxx:30
std::string str() const override
Returns a human readable string representation of the item.
Definition error.cxx:10