Documentation ¶
Index ¶
- func CombineErrors(errors ...error) error
- func CombineErrorsWithPrefix(prefix string, errors ...error) error
- func DiagsToError(prefix string, diags tfdiags.Diagnostics) error
- func EnrichPreparedStatementError(err error, queryName string, creationError error, declRange *hcl.Range) error
- func FailOnError(err error)
- func FailOnErrorWithMessage(err error, message string)
- func HandleCancelError(err error) error
- func IsCancelledError(err error) bool
- func IsPreparedStatementDoesNotExistError(err error) bool
- func PrefixError(err error, prefix string) error
- func ShowError(ctx context.Context, err error)
- func ShowErrorWithMessage(ctx context.Context, err error, message string)
- func ShowWarning(warning string)
- func TransformErrorToSteampipe(err error) error
- func WrapError(err error) error
- func WrapPreparedStatementError(err error) error
- type PreparedStatementError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineErrors ¶
func CombineErrorsWithPrefix ¶
func DiagsToError ¶
func DiagsToError(prefix string, diags tfdiags.Diagnostics) error
DiagsToError converts tfdiags diags into an error
func EnrichPreparedStatementError ¶
func EnrichPreparedStatementError(err error, queryName string, creationError error, declRange *hcl.Range) error
EnrichPreparedStatementError checks if the given error is a prepared statement error and if so, add in the given query name be printed on the console
func FailOnError ¶
func FailOnError(err error)
func FailOnErrorWithMessage ¶
func HandleCancelError ¶
HandleCancelError modifies a context.Canceled error into a readable error that can be printed on the console
func IsCancelledError ¶
func PrefixError ¶
func ShowErrorWithMessage ¶
ShowErrorWithMessage displays the given error nicely with the given message
func ShowWarning ¶
func ShowWarning(warning string)
func TransformErrorToSteampipe ¶
TransformErrorToSteampipe removes the pq: and rpc error prefixes along with all the unnecessary information that comes from the drivers and libraries
func WrapPreparedStatementError ¶
WrapPreparedStatementError modifies a context.Canceled error into a readable error that can be printed on the console
Types ¶
type PreparedStatementError ¶
type PreparedStatementError struct {
// contains filtered or unexported fields
}
PreparedStatementError is an error type to wrap PreparedStatement errors
func NewPreparedStatementError ¶
func NewPreparedStatementError(underlying error) *PreparedStatementError
func (*PreparedStatementError) Enrich ¶
func (e *PreparedStatementError) Enrich(name string, err error, declRange *hcl.Range) *PreparedStatementError
func (*PreparedStatementError) Error ¶
func (e *PreparedStatementError) Error() string
func (*PreparedStatementError) Is ¶
func (e *PreparedStatementError) Is(err error) bool