netdox_plugin_rs/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum FCallError {
5    #[error("function call to {function} had the wrong arguments: {problem}")]
6    WrongArgs {
7        function: &'static str,
8        problem: &'static str,
9    },
10    #[error("function call failed on redis: {0}")]
11    Redis(#[from] redis::RedisError),
12    #[error("a logical error was encountered: {0}")]
13    Logic(&'static str),
14}
15
16pub type FCallResult<T> = Result<T, FCallError>;