Debian Codegraph @

v8/config/error.go

raw
1 package config
2
3 import "fmt"
4
5 // UnsupportedDirective error.
6 type UnsupportedDirective struct {
7 text string
8 }
9
10 // Error implements the error interface for unsupported directives.
11 func (e UnsupportedDirective) Error() string {
12 return e.text
13 }
14
15 // Invalid config error.
16 type Invalid struct {
17 text string
18 }
19
20 // Error implements the error interface for invalid config error.
21 func (e Invalid) Error() string {
22 return e.text
23 }
24
25 // InvalidErrorf creates a new Invalid error.
26 func InvalidErrorf(format string, a ...interface{}) Invalid {
27 return Invalid{
28 text: fmt.Sprintf("invalid krb5 config "+format, a...),
29 }
30 }