From 5ddf2bd19178804c711ed69165e521a9d3a31531 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:06:41 -0400 Subject: [PATCH] chore: made XML error messages consistent --- src/ods.rs | 4 ++-- src/xlsb/mod.rs | 2 +- src/xlsx/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ods.rs b/src/ods.rs index 3135843..96a82c2 100644 --- a/src/ods.rs +++ b/src/ods.rs @@ -101,8 +101,8 @@ impl std::fmt::Display for OdsError { } OdsError::Password => write!(f, "Workbook is password protected"), OdsError::WorksheetNotFound(name) => write!(f, "Worksheet '{name}' not found"), - OdsError::AttrError(e) => write!(f, "XML Attribute Error: {e}"), - OdsError::EncodingError(e) => write!(f, "XML Encoding Error: {e}"), + OdsError::AttrError(e) => write!(f, "XML attribute Error: {e}"), + OdsError::EncodingError(e) => write!(f, "XML encoding Error: {e}"), } } } diff --git a/src/xlsb/mod.rs b/src/xlsb/mod.rs index aeaddce..84ffa55 100644 --- a/src/xlsb/mod.rs +++ b/src/xlsb/mod.rs @@ -117,7 +117,7 @@ impl std::fmt::Display for XlsbError { } XlsbError::Password => write!(f, "Workbook is password protected"), XlsbError::WorksheetNotFound(name) => write!(f, "Worksheet '{name}' not found"), - XlsbError::Encoding(e) => write!(f, "Encoding error: {e}"), + XlsbError::Encoding(e) => write!(f, "XML encoding error: {e}"), } } } diff --git a/src/xlsx/mod.rs b/src/xlsx/mod.rs index d51c70b..ff2bc21 100644 --- a/src/xlsx/mod.rs +++ b/src/xlsx/mod.rs @@ -149,7 +149,7 @@ impl std::fmt::Display for XlsxError { XlsxError::Password => write!(f, "Workbook is password protected"), XlsxError::TableNotFound(n) => write!(f, "Table '{n}' not found"), XlsxError::NotAWorksheet(typ) => write!(f, "Expecting a worksheet, got {typ}"), - XlsxError::Encoding(e) => write!(f, "Encoding error: {e}"), + XlsxError::Encoding(e) => write!(f, "XML encoding error: {e}"), XlsxError::XmlAttribute(e) => write!(f, "XML attribute error: {e}"), } }