Search Apps Documentation Source Content File Folder Download Copy Actions Download

errors.gno

0.50 Kb ยท 19 lines
 1package halt
 2
 3import (
 4	"errors"
 5
 6	"gno.land/p/nt/ufmt"
 7)
 8
 9var (
10	errHalted           = errors.New("halted")
11	errInvalidOpType    = errors.New("invalid operation type")
12	errInvalidHaltLevel = errors.New("invalid halt level")
13	errOpTypeNotFound   = errors.New("operation type not found in config")
14)
15
16// makeErrorWithDetails creates an error with additional details appended to the base error message.
17func makeErrorWithDetails(err error, details string) error {
18	return ufmt.Errorf("%s: %s", err.Error(), details)
19}