microcad_core/core_error.rs
1// Copyright © 2024-2026 The µcad authors <info@microcad.xyz>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4//! Core error
5
6use thiserror::Error;
7
8/// Core error
9#[derive(Debug, Error)]
10pub enum CoreError {
11 /// IO error
12 #[error("IO error: {0}")]
13 IoError(#[from] std::io::Error),
14
15 /// Parse float error
16 #[error("Parse float error: {0}")]
17 Error(#[from] std::num::ParseFloatError),
18}
19
20/// Core result type
21pub type CoreResult<T> = std::result::Result<T, CoreError>;