From b58f7710ff4d3c8772dee43e98a7166678706177 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 14 Dec 2022 23:05:19 +0100 Subject: [PATCH] seqwait: different error messages per variant Would have been handy to get slightly more details in https://github.com/neondatabase/neon/issues/3109 refs https://github.com/neondatabase/neon/issues/3109 --- libs/utils/src/seqwait.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/utils/src/seqwait.rs b/libs/utils/src/seqwait.rs index bf330a482c..e3f0b505da 100644 --- a/libs/utils/src/seqwait.rs +++ b/libs/utils/src/seqwait.rs @@ -11,11 +11,13 @@ use tokio::time::timeout; /// An error happened while waiting for a number #[derive(Debug, PartialEq, Eq, thiserror::Error)] -#[error("SeqWaitError")] pub enum SeqWaitError { /// The wait timeout was reached + #[error("seqwait timeout was reached")] Timeout, + /// [`SeqWait::shutdown`] was called + #[error("SeqWait::shutdown was called")] Shutdown, }