1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Authors: Robert Lopez

/// Represents any `Error` as a list of readable error strings
#[derive(Debug)]
pub struct WasmCssError(pub Vec<String>);

impl std::fmt::Display for WasmCssError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        writeln!(f, "Errors:");

        for error in self.0.iter() {
            writeln!(f, "{error}");
        }

        Ok(())
    }
}

impl std::error::Error for WasmCssError {}