Details
-
Task
-
Resolution: Gone away
-
Minor - P4
-
None
-
None
-
None
-
None
Description
Driver wrappers that support exceptions won't need to return a state value for error, but instead throw an exception, ala
underylingState = state_function(...))
|
if (underlyingState == ERROR) {
|
throw ...
|
|
|
return WrappingEnum.fromUnderlyingState(underlyingState);
|
It may be simpler if state functions return a boolean to indicate error:
if (!state_function(...))) {
|
throw ...
|
|
|
underylingState = get_state ()
|
return WrappingEnum.fromUnderlyingState(underlyingState);
|
Concretely, that would mean changing:
mongocrypt_encryptor_state_t
|
mongocrypt_encryptor_add_ns (mongocrypt_encryptor_t *encryptor, const char *ns);
|
to
bool
|
mongocrypt_encryptor_add_ns (mongocrypt_encryptor_t *encryptor, const char *ns);
|
Attachments
Issue Links
- is related to
-
MONGOCRYPT-166 Simplify public API
-
- Closed
-