MCPcopy Create free account
hub / github.com/couchbase/fleece / getCode

Method getCode

Fleece/Support/FleeceException.cc:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88
89 __cold
90 ErrorCode FleeceException::getCode(const std::exception &x) noexcept {
91 auto fleecex = dynamic_cast<const FleeceException*>(&x);
92 if (fleecex)
93 return fleecex->code;
94 else if (nullptr != dynamic_cast<const std::bad_alloc*>(&x))
95 return MemoryError;
96 else
97 return InternalError;
98 }
99
100}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected