diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-06 10:13:50 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-06 10:13:50 +0800 |
commit | 1b2e3c0cd0ca1bdf4cad031a0132ae6e802c2c95 (patch) | |
tree | fe8641dacb28b8223b989d6385504e153cbd6d64 /forged/internal/bare/errors.go | |
parent | Add the Apache license (diff) | |
download | forge-1b2e3c0cd0ca1bdf4cad031a0132ae6e802c2c95.tar.gz forge-1b2e3c0cd0ca1bdf4cad031a0132ae6e802c2c95.tar.zst forge-1b2e3c0cd0ca1bdf4cad031a0132ae6e802c2c95.zip |
Import BARE
Diffstat (limited to 'forged/internal/bare/errors.go')
-rw-r--r-- | forged/internal/bare/errors.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/forged/internal/bare/errors.go b/forged/internal/bare/errors.go new file mode 100644 index 0000000..39c951a --- /dev/null +++ b/forged/internal/bare/errors.go @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright (c) 2025 Drew Devault <https://drewdevault.com> + +package bare + +import ( + "errors" + "fmt" + "reflect" +) + +var ErrInvalidStr = errors.New("String contains invalid UTF-8 sequences") + +type UnsupportedTypeError struct { + Type reflect.Type +} + +func (e *UnsupportedTypeError) Error() string { + return fmt.Sprintf("Unsupported type for marshaling: %s\n", e.Type.String()) +} |