mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 14:47:54 +08:00
* Cleanup default font loading * Refactor fonts * Fix menulist mouse navigation * Format * Formatting * Move default font into consts.rs Co-authored-by: Keavon Chambers <keavon@keavon.com>
24 lines
571 B
Rust
24 lines
571 B
Rust
use super::LayerId;
|
|
use crate::boolean_ops::BooleanOperationError;
|
|
|
|
/// A set of different errors that can occur when using Graphene.
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub enum DocumentError {
|
|
LayerNotFound(Vec<LayerId>),
|
|
InvalidPath,
|
|
IndexOutOfBounds,
|
|
NotAFolder,
|
|
NonReorderableSelection,
|
|
NotAShape,
|
|
NotText,
|
|
NotAnImage,
|
|
InvalidFile(String),
|
|
}
|
|
|
|
// TODO: change how BooleanOperationErrors are handled
|
|
impl From<BooleanOperationError> for DocumentError {
|
|
fn from(err: BooleanOperationError) -> Self {
|
|
DocumentError::InvalidFile(format!("{:?}", err))
|
|
}
|
|
}
|