github.com/jaylevin/jenkins-library@v1.230.4/pkg/config/errors.go (about)

     1  package config
     2  
     3  // ParseError defines an error type for configuration parsing errors
     4  type ParseError struct {
     5  	message string
     6  }
     7  
     8  // NewParseError creates a new ParseError
     9  func NewParseError(message string) *ParseError {
    10  	return &ParseError{
    11  		message: message,
    12  	}
    13  }
    14  
    15  // Error returns the message of the ParseError
    16  func (e *ParseError) Error() string {
    17  	return e.message
    18  }