aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/secret.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-06-14 23:06:11 +0300
committerlevlam <levlam@telegram.org>2025-06-14 23:06:11 +0300
commit99491552d75d55c3ad6c8a6b149425f5ba31befa (patch)
tree57987f77f4cdf6323a299d2440c1ce9b4faefd75 /test/secret.cpp
parentfb04b8d40e5e3d24c30001af2e9784c91d4606c0 (diff)
Allow to pass error code and message directly to Promise::set_error.
Diffstat (limited to 'test/secret.cpp')
-rw-r--r--test/secret.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/secret.cpp b/test/secret.cpp
index 6580da226..3f0dfae67 100644
--- a/test/secret.cpp
+++ b/test/secret.cpp
@@ -633,7 +633,7 @@ class Master final : public Actor {
int32 binlog_generation_ = 0;
void sync_binlog(int32 binlog_generation, Promise<> promise) {
if (binlog_generation != binlog_generation_) {
- return promise.set_error(Status::Error("Binlog generation mismatch"));
+ return promise.set_error("Binlog generation mismatch");
}
binlog_->force_sync(std::move(promise), "sync_binlog");
}
@@ -992,10 +992,10 @@ void FakeSecretChatContext::on_delete_messages(std::vector<int64> random_id, Pro
promise.set_value(Unit());
}
void FakeSecretChatContext::on_flush_history(bool, MessageId, Promise<> promise) {
- promise.set_error(Status::Error("Unsupported"));
+ promise.set_error("Unsupported");
}
void FakeSecretChatContext::on_read_message(int64, Promise<> promise) {
- promise.set_error(Status::Error("Unsupported"));
+ promise.set_error("Unsupported");
}
TEST(Secret, go) {