pub enum JsGenError {
InvalidIdentifier {
name: String,
reason: String,
},
InvalidString(String),
GenerationError(String),
ValidationError {
message: String,
location: Option<CodeLocation>,
},
ManifestError {
path: String,
reason: String,
},
HashMismatch {
path: String,
expected: String,
actual: String,
},
Io(Error),
Json(Error),
}Expand description
Errors that can occur during JavaScript generation.
Each variant includes context for debugging while maintaining type safety per DO-178C requirements.
Variants§
InvalidIdentifier
Invalid identifier name (reserved word, invalid characters, etc.)
InvalidString(String)
Invalid string literal (unterminated, invalid escapes, etc.)
GenerationError(String)
Code generation failed
ValidationError
Validation failed
Fields
§
location: Option<CodeLocation>Location in generated code (if available)
ManifestError
Manifest verification failed (file was manually modified)
HashMismatch
Hash mismatch (generated file was modified)
Io(Error)
IO error during file operations
Json(Error)
JSON serialization/deserialization error
Trait Implementations§
Source§impl Debug for JsGenError
impl Debug for JsGenError
Source§impl Display for JsGenError
impl Display for JsGenError
Source§impl Error for JsGenError
impl Error for JsGenError
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()
Source§impl From<Error> for JsGenError
impl From<Error> for JsGenError
Auto Trait Implementations§
impl Freeze for JsGenError
impl !RefUnwindSafe for JsGenError
impl Send for JsGenError
impl Sync for JsGenError
impl Unpin for JsGenError
impl UnsafeUnpin for JsGenError
impl !UnwindSafe for JsGenError
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