pub enum XamlError {
Xml(XamlParseException),
Parse(XamlParseException),
Transform(XamlParseException),
Load(XamlParseException),
TypeSystem(XamlTypeSystemException),
Internal(XamlInternalException),
Aggregate(Vec<XamlError>),
}Variants§
Xml(XamlParseException)
A raw System.Xml.XmlException (malformed XML).
Parse(XamlParseException)
XamlParseException.
Transform(XamlParseException)
XamlTransformException.
Load(XamlParseException)
XamlLoadException.
TypeSystem(XamlTypeSystemException)
XamlTypeSystemException.
Internal(XamlInternalException)
Any other exception.
Aggregate(Vec<XamlError>)
AggregateException.
Implementations§
Source§impl XamlError
impl XamlError
pub fn xml_exception( message: impl Into<String>, line: i32, position: i32, ) -> Self
pub fn parse_exception_at( message: impl Into<String>, line: i32, position: i32, ) -> Self
pub fn parse_exception( message: impl Into<String>, line_info: Option<&dyn IXamlLineInfo>, ) -> Self
pub fn parse_exception_with_inner( message: impl Into<String>, line_info: Option<&dyn IXamlLineInfo>, inner: XamlError, ) -> Self
pub fn transform_exception( message: impl Into<String>, line_info: Option<&dyn IXamlLineInfo>, ) -> Self
pub fn transform_exception_with_inner( message: impl Into<String>, line_info: Option<&dyn IXamlLineInfo>, inner: XamlError, ) -> Self
pub fn load_exception( message: impl Into<String>, line_info: Option<&dyn IXamlLineInfo>, ) -> Self
pub fn type_system_exception(message: impl Into<String>) -> Self
pub fn internal(type_name: &'static str, message: impl Into<String>) -> Self
pub fn invalid_operation(message: impl Into<String>) -> Self
pub fn argument(message: impl Into<String>) -> Self
pub fn invalid_cast(message: impl Into<String>) -> Self
pub fn not_supported(message: impl Into<String>) -> Self
Sourcepub fn is_xml_exception(&self) -> bool
pub fn is_xml_exception(&self) -> bool
e is XmlException.
Sourcepub fn is_xaml_parse_exception(&self) -> bool
pub fn is_xaml_parse_exception(&self) -> bool
e is XamlParseException.
pub fn is_type_system_exception(&self) -> bool
Sourcepub fn as_xml_exception(&self) -> Option<&XamlParseException>
pub fn as_xml_exception(&self) -> Option<&XamlParseException>
The XmlException payload, when this error derives from XmlException.
Sourcepub fn with_derived_type_name(self, type_name: &'static str) -> Self
pub fn with_derived_type_name(self, type_name: &'static str) -> Self
Marks this error as an instance of a host class derived from the exception type it was
created as (e.g. a XamlTransformException subclass). No effect on errors that do not
derive from XmlException.
Sourcepub fn derived_type_name(&self) -> Option<&'static str>
pub fn derived_type_name(&self) -> Option<&'static str>
The name set by XamlError::with_derived_type_name.
Sourcepub fn is_derived_type(&self, type_name: &str) -> bool
pub fn is_derived_type(&self, type_name: &str) -> bool
e is TDerived for a host exception class named type_name.
pub fn line_number(&self) -> Option<i32>
pub fn line_position(&self) -> Option<i32>
Sourcepub fn document(&self) -> Option<&str>
pub fn document(&self) -> Option<&str>
XamlParseException.Document (only present on XamlParseException and derived).
Sourcepub fn with_document(self, document: Option<String>) -> Self
pub fn with_document(self, document: Option<String>) -> Self
Object-initializer { Document = ... }.
pub fn inner_exception(&self) -> Option<&XamlError>
Trait Implementations§
Source§impl Error for XamlError
impl Error for XamlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for XamlError
impl RefUnwindSafe for XamlError
impl Send for XamlError
impl Sync for XamlError
impl Unpin for XamlError
impl UnsafeUnpin for XamlError
impl UnwindSafe for XamlError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more