gltforge_unity_export/
error.rs1use error_location::ErrorLocation;
2use std::result::Result as StdResult;
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum ExportError {
7 #[error("I/O error writing '{path}': {source} {location}")]
8 Io {
9 path: String,
10 #[source]
11 source: std::io::Error,
12 location: ErrorLocation,
13 },
14
15 #[error("JSON serialization error: {source} {location}")]
16 Json {
17 #[source]
18 source: serde_json::Error,
19 location: ErrorLocation,
20 },
21}
22
23pub type ExportResult<T> = StdResult<T, ExportError>;