1use thiserror::Error;
2
3use crate::neo_codec::CodecError;
4
5#[derive(Error, Debug, PartialEq, Eq, Hash, Clone)]
6pub enum TypeError {
7 #[error("Illegal argument: {0}")]
8 IllegalArgument(String),
9 #[error("Illegal state: {0}")]
10 Deserialization(String),
11 #[error("Illegal state: {0}")]
12 IllegalState(String),
13 #[error("Index out of bounds: {0}")]
14 IndexOutOfBounds(String),
15 #[error("Invalid configuration: {0}")]
16 InvalidConfiguration(String),
17 #[error("Runtime error: {0}")]
18 Runtime(String),
19 #[error("Invalid data: {0}")]
20 InvalidData(String),
21 #[error("Unsupported operation: {0}")]
22 UnsupportedOperation(String),
23 #[error("Transaction error: {0}")]
24 Transaction(String),
25 #[error("Invalid script: {0}")]
26 InvalidScript(String),
27 #[error("Invalid format: {0}")]
28 InvalidFormat(String),
29 #[error("neo-rs not initialized")]
30 NeoNotInitialized,
31 #[error("Unexpected returned type: {0}")]
34 UnexpectedReturnType(String),
35 #[error("Invalid private key")]
36 InvalidPrivateKey,
37 #[error("Invalid public key")]
38 InvalidPublicKey,
39 #[error("Invalid address")]
40 InvalidAddress,
41 #[error("Invalid signature")]
42 InvalidSignature,
43 #[error("Invalid encoding {0}")]
44 InvalidEncoding(String),
45 #[error("Invalid op code")]
46 InvalidOpCode,
47 #[error("Invalid argument {0}")]
48 InvalidArgError(String),
49 #[error("Invalid neo name {0}")]
50 InvalidNeoName(String),
51 #[error("Numeric overflow")]
52 NumericOverflow,
53 #[error("Wif error {0}")]
54 WifError(String),
55 #[error(transparent)]
56 CodecError(#[from] CodecError),
57}