]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / aws / aws-sdk-go / internal / ini / parse_error.go
CommitLineData
107c1cdb
ND
1package ini
2
3import "fmt"
4
5const (
6 // ErrCodeParseError is returned when a parsing error
7 // has occurred.
8 ErrCodeParseError = "INIParseError"
9)
10
11// ParseError is an error which is returned during any part of
12// the parsing process.
13type ParseError struct {
14 msg string
15}
16
17// NewParseError will return a new ParseError where message
18// is the description of the error.
19func NewParseError(message string) *ParseError {
20 return &ParseError{
21 msg: message,
22 }
23}
24
25// Code will return the ErrCodeParseError
26func (err *ParseError) Code() string {
27 return ErrCodeParseError
28}
29
30// Message returns the error's message
31func (err *ParseError) Message() string {
32 return err.msg
33}
34
35// OrigError return nothing since there will never be any
36// original error.
37func (err *ParseError) OrigError() error {
38 return nil
39}
40
41func (err *ParseError) Error() string {
42 return fmt.Sprintf("%s: %s", err.Code(), err.Message())
43}