parse_error.go 386 B

12345678910111213141516171819
  1. package ini
  2. // ParseError is an error which is returned during any part of
  3. // the parsing process.
  4. type ParseError struct {
  5. msg string
  6. }
  7. // NewParseError will return a new ParseError where message
  8. // is the description of the error.
  9. func NewParseError(message string) *ParseError {
  10. return &ParseError{
  11. msg: message,
  12. }
  13. }
  14. func (err *ParseError) Error() string {
  15. return err.msg
  16. }