Files
desi_explorer/gui/src/error.odin
T
sam_oneal ac2d30510c
CI / Detect changed paths (pull_request) Failing after 34m20s
CI / Infra unit tests, vet, and preview (pull_request) Has been skipped
CI / API unit tests and lint (pull_request) Failing after 34m36s
CI / Odin unit tests and build (pull_request) Failing after 34m49s
added support for dotenv files and config
2026-09-07 13:27:51 -06:00

21 lines
317 B
Odin

package main
import "core:fmt"
import "core:strings"
ErrorType :: enum {
Config,
API,
}
Error :: struct {
type: ErrorType,
message: string,
}
format_error :: proc(err: ^Error) -> string {
sb := strings.builder_make(context.temp_allocator)
return fmt.sbprintf(&sb, "[%s] => %s", err.type, err.message)
}