Skip to main content

factorio_codegen/generator/
error.rs

1#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
2pub enum LuaGeneratorError {
3    // It could *technically*, but it's likely bad practice
4    #[error("function {0} cannot be `local` and exported!")]
5    FunctionLocalAndExported(String),
6
7    #[error("struct {0} cannot be `local` and exported!")]
8    StructLocalAndExported(String),
9
10    #[error("failed to get table path for struct: {0}")]
11    FailedToGetTablePathForStruct(String),
12}
13
14pub type LuaGeneratorResult<T> = Result<T, LuaGeneratorError>;