File: errors.go

package info (click to toggle)
golang-github-leodido-ragel-machinery 0.0~git20181214.299bdde-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 116 kB
  • sloc: makefile: 26
file content (22 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ragel

// ReadingError represents errors occurred in the readers.
type ReadingError struct {
	message string
}

// NewReadingError creates a ReadingError with the given message.
func NewReadingError(message string) *ReadingError {
	return &ReadingError{
		message: message,
	}
}

func (e *ReadingError) Error() string {
	return e.message
}

var (
	// ErrNotFound is the message representing a situation in which the needle we were looking for has not been found.
	ErrNotFound = "needle not found"
)