| 1 | package zfs |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | ) |
| 6 | |
| 7 | // Error is an error which is returned when the `zfs` or `zpool` shell |
| 8 | // commands return with a non-zero exit code. |
| 9 | type Error struct { |
| 10 | Err error |
| 11 | Debug string |
| 12 | Stderr string |
| 13 | } |
| 14 | |
| 15 | // Error returns the string representation of an Error. |
| 16 | func (e Error) Error() string { |
| 17 | return fmt.Sprintf("%s: %q => %s", e.Err, e.Debug, e.Stderr) |
| 18 | } |