src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

parse_error.go (386B)


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