ej_builder_sdk/error.rs
1//! Error types for the builder SDK.
2
3/// Builder SDK errors.
4#[derive(thiserror::Error, Debug)]
5pub enum Error {
6 /// Not enough command line arguments provided.
7 #[error("Not enough arguments provided. Expected {0}. Got {1}")]
8 MissingArgs(usize, usize),
9
10 /// Invalid argument
11 #[error("Invalid action {0}")]
12 InvalidAction(String),
13
14 /// I/O operation failed.
15 #[error(transparent)]
16 IO(#[from] std::io::Error),
17
18 /// JSON serialization/deserialization failed.
19 #[error(transparent)]
20 Json(#[from] serde_json::Error),
21}