Fix error code.
GitOrigin-RevId: b91a357cd115be02df17a141d2c7627ad1e4f4d2
This commit is contained in:
parent
96f720063a
commit
3823aa73e8
@ -36,7 +36,7 @@ Result<EncryptionInfo> check_encryption(string path) {
|
||||
Binlog binlog;
|
||||
auto status = binlog.init(path, Binlog::Callback());
|
||||
if (status.is_error() && status.code() != Binlog::Error::WrongPassword) {
|
||||
return std::move(status);
|
||||
return Status::Error(400, status.message());
|
||||
}
|
||||
EncryptionInfo info;
|
||||
info.is_encrypted = binlog.get_info().wrong_password;
|
||||
|
@ -38,7 +38,7 @@ class BinlogEventsBuffer;
|
||||
|
||||
class Binlog {
|
||||
public:
|
||||
enum Error { WrongPassword = 1 };
|
||||
enum Error : int { WrongPassword = -1 };
|
||||
static bool IGNORE_ERASE_HACK;
|
||||
Binlog();
|
||||
Binlog(const Binlog &other) = delete;
|
||||
|
Reference in New Issue
Block a user