aboutsummaryrefslogtreecommitdiff
path: root/error/error.go
blob: 1745c5285de1afdc7f3b02005054448bc6416e34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package error

import "fmt"

type SpecError struct {
	Cause error
	Row   int
}

func (e *SpecError) Error() string {
	if e.Row == 0 {
		return fmt.Sprintf("error: %v", e.Cause)
	}
	return fmt.Sprintf("%v: error: %v", e.Row, e.Cause)
}