Skip to main content

oxiphysics_io/
error.rs

1// Copyright 2026 COOLJAPAN OU (Team KitaSan)
2// SPDX-License-Identifier: Apache-2.0
3
4//! Error types for oxiphysics-io
5
6use thiserror::Error;
7
8/// Main error type for the io module
9#[derive(Debug, Error)]
10pub enum Error {
11    /// Generic error
12    #[error("{0}")]
13    General(String),
14
15    /// I/O error from std
16    #[error("I/O error: {0}")]
17    Io(#[from] std::io::Error),
18
19    /// Parse error
20    #[error("Parse error: {0}")]
21    Parse(String),
22}
23
24/// Result type alias
25pub type Result<T> = std::result::Result<T, Error>;