Sha256: ba86bfa05d09d8cfa32fde81ab756615c9b1ff01161b35d48541d85664b59b0b
Contents?: true
Size: 841 Bytes
Versions: 215
Compression:
Stored size: 841 Bytes
Contents
package erratum import "io" type TransientError struct { err error } func (e TransientError) Error() string { return e.err.Error() } type FrobError struct { defrobTag string inner error } func (e FrobError) Error() string { return e.inner.Error() } type Resource interface { io.Closer // Frob does something with the input string. // Because this is an incredibly badly designed system if there is an error // it panics. // // The paniced error may be a FrobError in which case Defrob should be called // with the defrobTag string. Frob(string) Defrob(string) } // ResourceOpener is a function that creates a resource. // // It may return a wrapped error of type TransientError. In this case the resource // is temporarily unavailable and the caller should retry soon. type ResourceOpener func() (Resource, error)
Version data entries
215 entries across 215 versions & 1 rubygems