pub enum ParserError {
Generic(String),
IO {
context: String,
source: Error,
},
Parse(String),
Component(String),
MissingAdoptedStylesheets {
tag: String,
},
Css(String),
Html(String),
Directive(String),
NotFound(String),
TsParseError(String),
Template(Box<Diagnostic>),
}Expand description
Error type for WebUI parser.
Variants§
Generic(String)
Generic error.
IO
I/O error with context.
Parse(String)
Parse error.
Component(String)
Component error.
MissingAdoptedStylesheets
A component supplied its own <template> wrapper under
CssStrategy::Module but did not declare a
shadowrootadoptedstylesheets attribute. The framework cannot
silently inject the attribute without overriding developer intent
on the wrapper, so authoring help is surfaced at build time.
Css(String)
CSS error.
Html(String)
HTML error.
Directive(String)
Directive error.
NotFound(String)
Entity not found error.
TsParseError(String)
TypeScript parse error.
Template(Box<Diagnostic>)
A build-time template-authoring mistake (e.g. an invalid @event
handler or a non-braced w-ref). Carries a structured Diagnostic
whose std::fmt::Display is an actionable, color-free report. The CLI
colorizes it; FFI/Node/WASM forward the plain text to their host error
channel so the application can handle it.
The diagnostic is boxed so this cold error path does not enlarge
Result<_, ParserError> on the common success path.
Trait Implementations§
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()