aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/plugin/discovery/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/plugin/discovery/error.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/plugin/discovery/error.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/plugin/discovery/error.go b/vendor/github.com/hashicorp/terraform/plugin/discovery/error.go
new file mode 100644
index 0000000..df855a7
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/plugin/discovery/error.go
@@ -0,0 +1,30 @@
1package discovery
2
3// Error is a type used to describe situations that the caller must handle
4// since they indicate some form of user error.
5//
6// The functions and methods that return these specialized errors indicate so
7// in their documentation. The Error type should not itself be used directly,
8// but rather errors should be compared using the == operator with the
9// error constants in this package.
10//
11// Values of this type are _not_ used when the error being reported is an
12// operational error (server unavailable, etc) or indicative of a bug in
13// this package or its caller.
14type Error string
15
16// ErrorNoSuitableVersion indicates that a suitable version (meeting given
17// constraints) is not available.
18const ErrorNoSuitableVersion = Error("no suitable version is available")
19
20// ErrorNoVersionCompatible indicates that all of the available versions
21// that otherwise met constraints are not compatible with the current
22// version of Terraform.
23const ErrorNoVersionCompatible = Error("no available version is compatible with this version of Terraform")
24
25// ErrorNoSuchProvider indicates that no provider exists with a name given
26const ErrorNoSuchProvider = Error("no provider exists with the given name")
27
28func (err Error) Error() string {
29 return string(err)
30}