gilly/error
Types
Error types for Gilly operations, such as reading files, parsing OpenAPI specs, and generating code.
Note: I’m trying to keep them ordered in the way they would occur in the flow of operations, from reading the file to generating code. If you’re adding new error types, please try to place them in the appropriate order for better readability.
pub type Error {
UnsupportedFileType(source: String, supported: List(String))
ReadingFile(source: String, inner: simplifile.FileError)
ParsingOpenAPI(source: String, inner: error.Error)
}
Constructors
-
UnsupportedFileType(source: String, supported: List(String))The provided file has an unsupported extension.
-
ReadingFile(source: String, inner: simplifile.FileError)Reading the provided file failed. This could be due to the file not existing, insufficient permissions, or other I/O errors.
-
ParsingOpenAPI(source: String, inner: error.Error)The OpenAPI JSON could not be parsed or decoded correctly.
Values
pub fn describe_error(error: Error) -> String