aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/mistifyio/go-zfs/error.go
blob: 5408ccdb55e262d0714c252673a4cf032729c676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package zfs

import (
	"fmt"
)

// Error is an error which is returned when the `zfs` or `zpool` shell
// commands return with a non-zero exit code.
type Error struct {
	Err    error
	Debug  string
	Stderr string
}

// Error returns the string representation of an Error.
func (e Error) Error() string {
	return fmt.Sprintf("%s: %q => %s", e.Err, e.Debug, e.Stderr)
}