aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config/error.go')
-rw-r--r--pkg/config/error.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/config/error.go b/pkg/config/error.go
index c49b6a9..41a323c 100644
--- a/pkg/config/error.go
+++ b/pkg/config/error.go
@@ -90,3 +90,18 @@ func newInvalidTokenError(token string) error {
token: token,
}
}
+
+// Invalid trainStop field error
+type InvalidTrainStopError struct {
+ trainStop string
+}
+
+func (e *InvalidTrainStopError) Error() string {
+ return fmt.Sprintf("Invalid trainStop %s : it must be a string that lookslike \"stop_area:SNCF:87723502\" (make sure to quote the string because of the colon characters)", e.trainStop)
+}
+
+func newInvalidTrainStopError(trainStop string) error {
+ return &InvalidTrainStopError{
+ trainStop: trainStop,
+ }
+}