Skip to content

Commit

Permalink
refactor(servers): remove numerical representation of ErrorSeverity
Browse files Browse the repository at this point in the history
  • Loading branch information
leaf-potato committed Jul 31, 2024
1 parent 83ae758 commit f946d91
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/servers/src/postgres/types/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@ use strum::{AsRefStr, Display, EnumIter, EnumMessage};
#[allow(dead_code)]
enum ErrorSeverity {
#[strum(serialize = "INFO")]
Info = 0,
Info,
#[strum(serialize = "DEBUG")]
Debug = 1,
Debug,
#[strum(serialize = "NOTICE")]
Notice = 2,
Notice,
#[strum(serialize = "WARNING")]
Warning = 3,

Warning,
#[strum(serialize = "ERROR")]
Error = 10,
Error,
#[strum(serialize = "FATAL")]
Fatal = 11,
Fatal,
#[strum(serialize = "PANIC")]
Panic = 12,
Panic,
}

// refer to: https://www.postgresql.org/docs/16/errcodes-appendix.html
Expand Down

0 comments on commit f946d91

Please sign in to comment.