1use displaydoc::Display;
3use std::io;
4use thiserror::Error;
5
6#[derive(Debug, Display, Error)]
8pub enum ModuleError {
9 Io(#[from] io::Error),
11
12 LoadError(String, String),
14
15 UnloadError(String, String),
17
18 InvalidModule(String),
20}
21
22pub(crate) mod text {
24 pub const INVALID_EXTENSION: &str = "invalid or missing extension";
25
26 pub const COMPRESSION: &str = "unsupported or invalid compression";
27
28 pub const NOT_FOUND: &str = "not found";
29
30 pub const NAME: &str = "invalid module name";
31
32 pub const PARAMETER: &str = "invalid module parameter name";
33
34 pub const MODINFO: &str = "invalid .modinfo";
35}