work_result(ErlNifEnv *env, const ERL_NIF_TERM& error, rocksdb::Status& status) : _is_set(true) { ERL_NIF_TERM reason = enif_make_string(env, status.ToString().c_str(), ERL_NIF_LATIN1); _result = enif_make_tuple2(env, erocksdb::ATOM_ERROR, enif_make_tuple2(env, error, reason)); }
Status toMongoStatus( rocksdb::Status s ) { if ( s.ok() ) return Status::OK(); else return Status( ErrorCodes::InternalError, s.ToString() ); }