forked from gruntwork-io/terragrunt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
34 lines (26 loc) · 1.11 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package configstack
import "fmt"
// Custom error types
type UnrecognizedDependency struct {
ModulePath string
DependencyPath string
TerragruntConfigPaths []string
}
func (err UnrecognizedDependency) Error() string {
return fmt.Sprintf("Module %s specifies %s as a dependency, but that dependency was not one of the ones found while scanning subfolders: %v", err.ModulePath, err.DependencyPath, err.TerragruntConfigPaths)
}
type ErrorProcessingModule struct {
UnderlyingError error
ModulePath string
HowThisModuleWasFound string
}
func (err ErrorProcessingModule) Error() string {
return fmt.Sprintf("Error processing module at '%s'. How this module was found: %s. Underlying error: %v", err.ModulePath, err.HowThisModuleWasFound, err.UnderlyingError)
}
type InfiniteRecursion struct {
RecursionLevel int
Modules map[string]*TerraformModule
}
func (err InfiniteRecursion) Error() string {
return fmt.Sprintf("Hit what seems to be an infinite recursion after going %d levels deep. Please check for a circular dependency! Modules involved: %v", err.RecursionLevel, err.Modules)
}