github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationconstraint/error.go (about)

     1  package formationconstraint
     2  
     3  import "fmt"
     4  
     5  // ConstraintError is structured error containing the name of the Constraint and the reason for the error
     6  type ConstraintError struct {
     7  	ConstraintName string
     8  	Reason         string
     9  }
    10  
    11  // Error implements the Error interface
    12  func (e ConstraintError) Error() string {
    13  	return fmt.Sprintf("Formation constraint %q is not satisfied due to: %s", e.ConstraintName, e.Reason)
    14  }