Files
rustytorch/crates/specialized/rtx-fem-export/src/error.rs
T
2026-03-04 00:08:42 +00:00

39 lines
972 B
Rust

//! Error types for FEM export operations.
use thiserror::Error;
/// Errors that can occur during FEM export operations.
#[derive(Error, Debug)]
pub enum FemExportError {
/// I/O error during file operations.
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
/// Invalid model data.
#[error("Invalid model: {0}")]
InvalidModel(String),
/// Invalid element type.
#[error("Invalid element type: {0}")]
InvalidElement(String),
/// Invalid material definition.
#[error("Invalid material: {0}")]
InvalidMaterial(String),
/// Parse error when reading FEM files.
#[error("Parse error: {0}")]
ParseError(String),
/// Unsupported feature or format.
#[error("Unsupported: {0}")]
Unsupported(String),
/// Missing required data.
#[error("Missing data: {0}")]
MissingData(String),
}
/// Result type for FEM export operations.
pub type Result<T> = std::result::Result<T, FemExportError>;