kubemgrwasm/utils/
errors.rs1use std::fmt;
2
3#[derive(Debug)]
4pub enum KubeMergeError {
5 NoContent(String),
6 FileNotFound(String),
7 FileReadError(String),
8 ParseError(String),
9 WriteError(String),
10 UserCancelled(String),
11 InsufficientFiles(String),
12 SomeOtherError,
13}
14
15impl fmt::Display for KubeMergeError {
16 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17 match self {
18 KubeMergeError::ParseError(msg) => write!(f, "{}", msg),
19 _ => write!(f, "An unknown KubeMergeError occurred"),
20 }
21 }
22}