| 62 | } |
| 63 | |
| 64 | std::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 | |
| 72 | const StringBox& Error::getMessage() const noexcept { |
| 73 | return _storage != nullptr ? _storage->message : StringBox::emptyString(); |