MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getCause

Method getCause

valdi_core/src/valdi_core/cpp/Utils/Error.cpp:64–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64std::optional<Error> Error::getCause() const noexcept {
65 if (_storage == nullptr || _storage->cause == nullptr) {
66 return std::nullopt;
67 }
68
69 return Error(_storage->cause);
70}
71
72const StringBox& Error::getMessage() const noexcept {
73 return _storage != nullptr ? _storage->message : StringBox::emptyString();

Callers 2

rethrowMethod · 0.80
runMethod · 0.80

Calls 1

ErrorClass · 0.70

Tested by

no test coverage detected