1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use crate::manifest::ManifestError;
use crate::sdk_version::SDKVersionError;
use thiserror::Error as ThisError;
#[derive(Debug, ThisError)]
pub enum ModuleInfoError {
#[error("the module doesn't contain section with '{0}', probably it's compiled with an old sdk version")]
NoCustomSection(&'static str),
#[error("the module contains {1} sections with name '{0}' - it's corrupted")]
MultipleCustomSections(&'static str, usize),
#[error("{0}")]
VersionError(#[from] SDKVersionError),
#[error("{0}")]
ManifestError(#[from] ManifestError),
#[error("provided Wasm file is corrupted: {0}")]
CorruptedWasmFile(anyhow::Error),
#[error("emitting resulted Wasm file failed with: {0}")]
WasmEmitError(anyhow::Error),
}