[librsvg: 3/32] Add LoadingError::LimitExceeded
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 3/32] Add LoadingError::LimitExceeded
- Date: Fri, 4 Dec 2020 21:11:30 +0000 (UTC)
commit 3130f5846e38e8630758abb895308c2397ea3d30
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Nov 25 11:29:39 2020 -0600
Add LoadingError::LimitExceeded
src/error.rs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/error.rs b/src/error.rs
index 6aa53095..32c8d2c4 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -348,6 +348,9 @@ pub enum LoadingError {
/// Generally an I/O error, or another error from GIO.
Glib(glib::Error),
+ /// A particular implementation-defined limit was exceeded.
+ LimitExceeded(String),
+
// FIXME: only used internally when loading pixbufs, and temporarily in c_api.
Unknown,
}
@@ -369,6 +372,7 @@ impl fmt::Display for LoadingError {
LoadingError::SvgHasNoElements => write!(f, "SVG has no elements"),
LoadingError::RootElementIsNotSvg => write!(f, "root element is not <svg>"),
LoadingError::Glib(ref e) => e.fmt(f),
+ LoadingError::LimitExceeded(ref s) => write!(f, "limit exceeded: {}", s),
LoadingError::Unknown => write!(f, "unknown error"),
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]