Skip to content

Commit

Permalink
Update ParseSopAttributes Error to be singular and include display me…
Browse files Browse the repository at this point in the history
…ssage

Update ParseSopAttributes Error to be singular and include display message
  • Loading branch information
chrisb154 committed Jul 21, 2024
1 parent c9160c8 commit 3134d65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion object/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ pub enum ReadError {
#[snafu(backtrace)]
source: crate::meta::Error,
},
ParseSopAttributes {
#[snafu(display("Could not parse sop attribute"))]
ParseSopAttribute {
#[snafu(source(from(dicom_core::value::ConvertValueError, Box::from)))]
source: Box<dicom_core::value::ConvertValueError>,
backtrace: Backtrace,
Expand Down
6 changes: 3 additions & 3 deletions object/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ use crate::{
CreatePrinterSnafu, DicomObject, ElementNotFoundSnafu, FileDicomObject, InvalidGroupSnafu,
MissingElementValueSnafu, MissingLeafElementSnafu, NoSpaceSnafu, NoSuchAttributeNameSnafu,
NoSuchDataElementAliasSnafu, NoSuchDataElementTagSnafu, NotASequenceSnafu, OpenFileSnafu,
ParseMetaDataSetSnafu, ParseSopAttributesSnafu, PrematureEndSnafu, PrepareMetaTableSnafu,
ParseMetaDataSetSnafu, ParseSopAttributeSnafu, PrematureEndSnafu, PrepareMetaTableSnafu,
PrintDataSetSnafu, PrivateCreatorNotFoundSnafu, PrivateElementError, ReadError, ReadFileSnafu,
ReadPreambleBytesSnafu, ReadTokenSnafu, ReadUnsupportedTransferSyntaxSnafu,
UnexpectedTokenSnafu, WithMetaError, WriteError,
Expand Down Expand Up @@ -384,7 +384,7 @@ where
meta.media_storage_sop_class_uid = elem
.value()
.to_str()
.context(ParseSopAttributesSnafu)?
.context(ParseSopAttributeSnafu)?
.to_string();
}
}
Expand All @@ -395,7 +395,7 @@ where
meta.media_storage_sop_instance_uid = elem
.value()
.to_str()
.context(ParseSopAttributesSnafu)?
.context(ParseSopAttributeSnafu)?
.to_string();
}
}
Expand Down

0 comments on commit 3134d65

Please sign in to comment.