utils

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler struct {
	Ctx context.Context
	// contains filtered or unexported fields
}

ErrorHandler creates an error handler to combine logging and reporting errors

func NewErrorHandler

func NewErrorHandler(ctx context.Context, diags *diag.Diagnostics) *ErrorHandler

NewErrorHandler creates an error handler based on current context and TF diagnostics

func (*ErrorHandler) MakeAndLogError

func (e *ErrorHandler) MakeAndLogError(msg string) error

MakeAndLogError builds an error using message and logs the error with tflog

func (*ErrorHandler) MakeAndReportError

func (e *ErrorHandler) MakeAndReportError(summary string, msg string) error

MakeAndReportError builds an error using message and logs the error with tflog The error is added to the diagnostic and will be reported by Terraform

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL