6 // ErrCodeParseError is returned when a parsing error
8 ErrCodeParseError = "INIParseError"
11 // ParseError is an error which is returned during any part of
12 // the parsing process.
13 type ParseError struct {
17 // NewParseError will return a new ParseError where message
18 // is the description of the error.
19 func NewParseError(message string) *ParseError {
25 // Code will return the ErrCodeParseError
26 func (err *ParseError) Code() string {
27 return ErrCodeParseError
30 // Message returns the error's message
31 func (err *ParseError) Message() string {
35 // OrigError return nothing since there will never be any
37 func (err *ParseError) OrigError() error {
41 func (err *ParseError) Error() string {
42 return fmt.Sprintf("%s: %s", err.Code(), err.Message())