Documentation ¶
Index ¶
- func IsRecoverable(err error) bool
- func LongForError(err error) string
- func New(short, long string) error
- func NewRecoverable(short, long string) error
- func OmitLongMessage(err error) bool
- func ShortForError(err error) string
- func Wrap(err error, shortMsg string) error
- func Wrapf(err error, shortMsg string, a ...interface{}) error
- type PluginError
- func (e *PluginError) Error() string
- func (e *PluginError) Recoverable() *PluginError
- func (e *PluginError) ShowLong() *PluginError
- func (e *PluginError) WithLong(msg string) *PluginError
- func (e *PluginError) WithLongf(format string, args ...interface{}) *PluginError
- func (e *PluginError) WithShort(msg string) *PluginError
- func (e *PluginError) WithShortf(format string, args ...interface{}) *PluginError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRecoverable ¶
IsRecoverable indicates if the error is recoverable
func LongForError ¶
LongForError returns LongMsg message for the error
func New ¶
New creates new plugin error. ShortMsg error message is meant for the github output whereas the LongMsg message is for the internal log
func NewRecoverable ¶
NewRecoverable creates new plugin error that does not delete the state so it can be resumed after a restart. ShortMsg error message is meant for the github output whereas the LongMsg message is for the internal log
func OmitLongMessage ¶
OmitLongMessage indicates if the error's LongMsg message should be omitted in the github response.
func ShortForError ¶
ShortForError returns ShortMsg message for the error
Types ¶
type PluginError ¶
type PluginError struct { ShortMsg string LongMsg string // contains filtered or unexported fields }
func Builder ¶
func Builder() *PluginError
func (*PluginError) Error ¶
func (e *PluginError) Error() string
func (*PluginError) Recoverable ¶
func (e *PluginError) Recoverable() *PluginError
Recoverable sets the recoverability of the error to true.
func (*PluginError) ShowLong ¶
func (e *PluginError) ShowLong() *PluginError
ShowLong shows the LongMsg message in github response.
func (*PluginError) WithLong ¶
func (e *PluginError) WithLong(msg string) *PluginError
WithLong sets the LongMsg message of a plugin error.
func (*PluginError) WithLongf ¶
func (e *PluginError) WithLongf(format string, args ...interface{}) *PluginError
WithLongf templates the given message and sets it as the LongMsg message of a plugin error.
func (*PluginError) WithShort ¶
func (e *PluginError) WithShort(msg string) *PluginError
WithShort sets the ShortMsg message of a plugin error.
func (*PluginError) WithShortf ¶
func (e *PluginError) WithShortf(format string, args ...interface{}) *PluginError
WithShortf templates the given message and sets it as the ShortMsg message of a plugin error.