3 Star 1 Fork 0

Gitee 极速下载/aws-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aws/aws-sdk-go
克隆/下载
error.go 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
package expression
import (
"fmt"
)
// InvalidParameterError is returned if invalid parameters are encountered. This
// error specifically refers to situations where parameters are non-empty but
// have an invalid syntax/format. The error message includes the function
// that returned the error originally and the parameter type that was deemed
// invalid.
//
// Example:
//
// // err is of type InvalidParameterError
// _, err := expression.Name("foo..bar").BuildOperand()
type InvalidParameterError struct {
parameterType string
functionName string
}
func (ipe InvalidParameterError) Error() string {
return fmt.Sprintf("%s error: invalid parameter: %s", ipe.functionName, ipe.parameterType)
}
func newInvalidParameterError(funcName, paramType string) InvalidParameterError {
return InvalidParameterError{
parameterType: paramType,
functionName: funcName,
}
}
// UnsetParameterError is returned if parameters are empty and uninitialized.
// This error is returned if opaque structs (ConditionBuilder, NameBuilder,
// Builder, etc) are initialized outside of functions in the package, since all
// structs in the package are designed to be initialized with functions.
//
// Example:
//
// // err is of type UnsetParameterError
// _, err := expression.Builder{}.Build()
// _, err := expression.NewBuilder().
// WithCondition(expression.ConditionBuilder{}).
// Build()
type UnsetParameterError struct {
parameterType string
functionName string
}
func (upe UnsetParameterError) Error() string {
return fmt.Sprintf("%s error: unset parameter: %s", upe.functionName, upe.parameterType)
}
func newUnsetParameterError(funcName, paramType string) UnsetParameterError {
return UnsetParameterError{
parameterType: paramType,
functionName: funcName,
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/aws-sdk-go.git
git@gitee.com:mirrors/aws-sdk-go.git
mirrors
aws-sdk-go
aws-sdk-go
v1.13.56

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385