miden_mast_package/package/
error.rs1use alloc::string::String;
2
3use miden_core::serde::DeserializationError;
4
5use super::section::SectionId;
6
7#[derive(Debug, thiserror::Error)]
9pub enum PackageStripError {
10 #[error("failed to decode embedded kernel package while stripping debug info: {source}")]
11 DecodeEmbeddedKernel {
12 #[source]
13 source: DeserializationError,
14 },
15}
16
17#[derive(Debug, thiserror::Error)]
19pub enum PackageDebugInfoError {
20 #[error("package debug sections are present but are not trusted")]
21 UntrustedSections,
27 #[error("package contains multiple '{id}' debug sections")]
28 DuplicateSection {
29 id: SectionId,
31 },
32 #[error("failed to decode '{id}' debug section: {source}")]
33 DecodeSection {
34 id: SectionId,
36 #[source]
38 source: DeserializationError,
39 },
40 #[error("'{id}' debug section has trailing bytes")]
41 TrailingBytes {
42 id: SectionId,
44 },
45 #[error("invalid package debug info: {message}")]
46 InvalidReference { message: String },
47}