-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror_types.go
27 lines (21 loc) · 951 Bytes
/
error_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright © 2016,2018,2025 Pennock Tech, LLC.
// All rights reserved, except as granted under license.
// Licensed per file LICENSE.txt
package tabular // import "go.pennock.tech/tabular"
import (
"errors"
"fmt"
)
// NoSuchCellError is returned when a table is asked for a cell at some
// coordinates which do not exist within the table.
type NoSuchCellError struct {
_ struct{}
Location CellLocation
}
func (e NoSuchCellError) Error() string {
return fmt.Sprintf("tabular: table does not contain cell at coordinates [row %d, col %d]", e.Location.Row, e.Location.Column)
}
// ErrMissingPropertyHolder is returned if you call SetProperty upon a nil object.
var ErrMissingPropertyHolder = errors.New("tabular: missing item upon which to set a property")
// ErrNoColumnsToDisplay is returned if there are no columns when rendering, or all columns are omitted
var ErrNoColumnsToDisplay = errors.New("tabular: no columns to display")