MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ApplyError

Enum ApplyError

atomic-core/src/apply/error.rs:456–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454/// ```
455#[derive(Debug, Error)]
456pub enum ApplyError {
457 /// An error in the apply logic itself.
458 ///
459 /// This wraps [`LocalApplyError`] for errors specific to the
460 /// change application process.
461 #[error("Apply error: {0}")]
462 Local(#[from] LocalApplyError),
463
464 /// A database/pristine storage error.
465 ///
466 /// This indicates a problem with the underlying storage layer.
467 #[error("Pristine error: {0}")]
468 Pristine(#[from] PristineError),
469
470 /// An IO error occurred.
471 ///
472 /// This typically happens when reading change files from disk.
473 #[error("IO error: {0}")]
474 Io(#[from] std::io::Error),
475
476 /// Error reading or parsing the change data.
477 ///
478 /// This occurs when the change file is corrupted or in an
479 /// unrecognized format.
480 ///
481 /// # Fields
482 ///
483 /// * `message` - Description of the parse error
484 #[error("Change parse error: {message}")]
485 ChangeParse {
486 /// What went wrong during parsing
487 message: String,
488 },
489
490 /// The change file was not found.
491 ///
492 /// # Fields
493 ///
494 /// * `hash` - The hash of the change that's missing
495 /// * `path` - The expected path where the change file should be
496 #[error("Change file not found for {hash} at {}", path.display())]
497 ChangeNotFound {
498 /// The hash of the missing change
499 hash: Hash,
500 /// Where we looked for it
501 path: PathBuf,
502 },
503}
504
505impl ApplyError {
506 /// Create a new change-parse error.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected