caffeine_lang/common/errors
Types
Represents top level compilation errors.
pub type CompilationError {
ParserFileReadError(msg: String)
ParserJsonParserError(msg: String)
ParserDuplicateError(msg: String)
LinkerParseError(msg: String)
LinkerSemanticError(msg: String)
SemanticAnalysisVendorResolutionError(msg: String)
SemanticAnalysisTemplateParseError(msg: String)
SemanticAnalysisTemplateResolutionError(msg: String)
GeneratorSloQueryResolutionError(msg: String)
GeneratorDatadogTerraformResolutionError(msg: String)
CQLResolverError(msg: String)
CQLParserError(msg: String)
CQLGeneratorError(msg: String)
}
Constructors
-
ParserFileReadError(msg: String) -
ParserJsonParserError(msg: String) -
ParserDuplicateError(msg: String) -
LinkerParseError(msg: String) -
LinkerSemanticError(msg: String) -
SemanticAnalysisVendorResolutionError(msg: String) -
SemanticAnalysisTemplateParseError(msg: String) -
SemanticAnalysisTemplateResolutionError(msg: String) -
GeneratorSloQueryResolutionError(msg: String) -
GeneratorDatadogTerraformResolutionError(msg: String) -
CQLResolverError(msg: String) -
CQLParserError(msg: String) -
CQLGeneratorError(msg: String)
Values
pub fn format_decode_error_message(
errors: List(decode.DecodeError),
type_key_identifier: option.Option(String),
) -> String
Formats a list of decode errors into a human-readable string.
pub fn format_json_decode_error(
error: json.DecodeError,
) -> CompilationError
Converts a JSON decode error into a CompilationError. Useful for leveraging the custom errors we have per compilation phase vs. the lower level ones from various libraries we leverage.
pub fn format_json_decode_error_to_string(
error: json.DecodeError,
) -> String
Converts a JSON decode error directly to a string (for browser error messages).