tonlib_core/library_helper/
error.rs

1use thiserror::Error;
2
3use crate::cell::TonCellError;
4use crate::types::TonHashParseError;
5
6#[derive(Error, Debug)]
7pub enum TonLibraryError {
8    #[error("{0}")]
9    TonClientError(String),
10
11    #[error("{0}")]
12    TonCellError(#[from] TonCellError),
13
14    #[error("{0}")]
15    TonHashParseError(#[from] TonHashParseError),
16
17    #[error("Library not found for {0}")]
18    LibraryNotFound(String),
19
20    #[error("Expected exactly one library, but got multiple")]
21    MultipleLibrariesReturned,
22
23    #[error("Getting library by mc_seqno is not supported")]
24    SeqnoNotSupported,
25}