/// Core error type for Fluent runtime system. /// /// It contains three main types of errors that may come up /// during runtime use of the fluent-bundle crate. #[derive(Debug, PartialEq, Clone)] pubenum FluentError { /// An error which occurs when /// [`FluentBundle::add_resource`](crate::bundle::FluentBundle::add_resource) /// adds entries that are already registered in a given [`FluentBundle`](crate::FluentBundle). /// /// # Example /// /// ``` /// use fluent_bundle::{FluentBundle, FluentResource}; /// use unic_langid::langid; /// /// let ftl_string = String::from("intro = Welcome, { $name }."); /// let res1 = FluentResource::try_new(ftl_string) /// .expect("Could not parse an FTL string."); /// /// let ftl_string = String::from("intro = Hi, { $name }."); /// let res2 = FluentResource::try_new(ftl_string) /// .expect("Could not parse an FTL string."); /// /// let langid_en = langid!("en-US"); /// let mut bundle = FluentBundle::new(vec![langid_en]); /// /// bundle.add_resource(&res1) /// .expect("Failed to add FTL resources to the bundle."); /// /// assert!(bundle.add_resource(&res2).is_err()); /// ```
Overriding {
kind: EntryKind,
id: String,
},
ParserError(ParserError),
ResolverError(ResolverError),
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.