Skip to content

Commit

Permalink
Merge pull request #152 from mamba-org/feat/expose-convert-subdir-error
Browse files Browse the repository at this point in the history
fix: expose error to outside crates
  • Loading branch information
tdejager authored Apr 3, 2023
2 parents bd4229f + 793fd2d commit fade382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/rattler_conda_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub use no_arch_type::{NoArchKind, NoArchType};
pub use platform::{ParsePlatformError, Platform};
pub use prefix_record::PrefixRecord;
pub use repo_data::patches::{PackageRecordPatch, PatchInstructions, RepoDataPatch};
pub use repo_data::{ChannelInfo, PackageRecord, RepoData};
pub use repo_data::{ChannelInfo, ConvertSubdirError, PackageRecord, RepoData};
pub use repo_data_record::RepoDataRecord;
pub use run_export::RunExportKind;
pub use version::{ParseVersionError, ParseVersionErrorKind, Version};
Expand Down
3 changes: 3 additions & 0 deletions crates/rattler_conda_types/src/repo_data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,18 @@ impl RepoData {
/// An error that can occur when parsing a platform from a string.
#[derive(Debug, Error, Clone, Eq, PartialEq)]
pub enum ConvertSubdirError {
/// No known combination for this platform is known
#[error("platform: {platform}, arch: {arch} is not a known combination")]
NoKnownCombination {
/// The platform string that could not be parsed.
platform: String,
/// The architecture.
arch: String,
},
/// Platform key is empty
#[error("platform key is empty in index.json")]
PlatformEmpty,
/// Arc key is empty
#[error("arch key is empty in index.json")]
ArchEmpty,
}
Expand Down

0 comments on commit fade382

Please sign in to comment.