pub enum MigrationError {
BackupFailed(String),
ReadFailed(String),
TomlParseError(String),
WriteFailed(String),
BackupNotFound(String),
RestoreFailed(String),
NotAnAnchorProject(String),
OracleDetectionFailed(String),
}
Expand description
Represents all possible errors that can occur during migration.
Variants§
BackupFailed(String)
Failed to create a backup of the Anchor.toml file.
This typically occurs when there are permission issues or the file is locked.
ReadFailed(String)
Failed to read the Anchor.toml file.
This can happen if the file doesn’t exist or is not accessible.
TomlParseError(String)
Failed to parse the Anchor.toml file.
This indicates the file exists but contains invalid TOML.
WriteFailed(String)
Failed to write to the Anchor.toml file.
This can occur due to permission issues or disk space problems.
BackupNotFound(String)
The specified backup file was not found.
This occurs when trying to restore from a non-existent backup.
RestoreFailed(String)
Failed to restore from a backup.
This can happen if the backup file is corrupted or inaccessible.
NotAnAnchorProject(String)
The specified path is not a valid Anchor project.
This error is returned when the expected Anchor project structure is not found.
OracleDetectionFailed(String)
Oracle detection failed.
This error occurs when there are issues detecting or analyzing oracles.