fluence_sdk_test_macro_impl/
errors.rs1use fce_wit_parser::WITParserError;
18use fluence_app_service::AppServiceError;
19
20use darling::Error as DarlingError;
21use syn::Error as SynError;
22use thiserror::Error as ThisError;
23
24#[derive(Debug, ThisError)]
25pub enum TestGeneratorError {
26 #[error("Can't load Wasm modules into FCE: {0}")]
27 WITParserError(#[from] WITParserError),
28
29 #[error("{0}")]
30 CorruptedITSection(#[from] CorruptedITSection),
31
32 #[error("{0}")]
33 SynError(#[from] SynError),
34
35 #[error("Can't load Wasm modules from the provided config: {0}")]
36 ConfigLoadError(#[from] AppServiceError),
37
38 #[error("{0}")]
39 AttributesError(#[from] DarlingError),
40
41 #[error(
42 "neither modules_dir attribute specified nor service config contains modules_dir, please specify one of them"
43 )]
44 ModulesDirUnspecified,
45
46 #[error("a Wasm file compiled with newer version of sdk that supports multi-value")]
47 ManyFnOutputsUnsupported,
48}
49
50#[derive(Debug, ThisError)]
51pub enum CorruptedITSection {
52 #[error("record with {0} is absent in embedded IT section")]
53 AbsentRecord(u64),
54}