Add error code for unknown error

pull/29/head
Thijs Cadier 7 years ago
parent 2a42c5da7b
commit 8445e39a73

@ -148,7 +148,7 @@ pub enum MongoErrorCode {
QueryNotTailable,
WriteConcernError,
DuplicateKey,
Unknown
Unknown(u32)
}
impl BsoncError {
@ -226,7 +226,7 @@ impl BsoncError {
bindings::MONGOC_ERROR_QUERY_NOT_TAILABLE => MongoErrorCode::QueryNotTailable,
bindings::MONGOC_ERROR_WRITE_CONCERN_ERROR => MongoErrorCode::WriteConcernError,
bindings::MONGOC_ERROR_DUPLICATE_KEY => MongoErrorCode::DuplicateKey,
_ => MongoErrorCode::Unknown
code => MongoErrorCode::Unknown(code)
}
}

Loading…
Cancel
Save