1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
//! Error types used in the gerber-types library. use std::io::Error as IoError; quick_error! { #[derive(Debug)] pub enum GerberError { /// Conversion between two types failed ConversionError(msg: String) {} /// Bad coordinate format CoordinateFormatError(msg: String) {} /// A value is out of range RangeError(msg: String) {} /// Required data is missing MissingDataError(msg: String) {} /// I/O error during code generation IoError(err: IoError) { cause(err) from() } } } pub type GerberResult<T> = Result<T, GerberError>;