Documentation
¶
Index ¶
- Constants
- func RpcErrorToCordError(err error) error
- func RpcErrorWithIdToCordError(err error, modelName string, id int32) error
- func RpcErrorWithModelNameToCordError(err error, modelName string) error
- func RpcErrorWithObjToCordError(err error, obj ObjectReference) error
- func RpcErrorWithQueriesToCordError(err error, modelName string, queries map[string]string) error
- func WithStackTrace(err CordCtlError) error
- type AbortedError
- type BaseError
- type ChecksumMismatchError
- type CordCtlError
- type FieldDoesNotExistError
- type FilterRequiredError
- type IllegalQueryError
- type InternalError
- type InvalidInputError
- type ModelNotFoundError
- type NoMatchError
- type ObjectReference
- type PermissionDeniedError
- type TransferError
- type TypeConversionError
- type UnavailableError
- type UnexpectedError
- type UnknownModelStateError
- type UnknownModelTypeError
- type UserError
- type VersionConstraintError
Constants ¶
const (
MaxStackDepth = 50
)
Variables ¶
This section is empty.
Functions ¶
func RpcErrorToCordError ¶
func RpcErrorWithObjToCordError ¶
func RpcErrorWithObjToCordError(err error, obj ObjectReference) error
func WithStackTrace ¶
func WithStackTrace(err CordCtlError) error
Attach a stack trace to an error. The error passed in must be a pointer to an error structure for the CordCtlError interface to match.
Types ¶
type AbortedError ¶
type AbortedError struct {
UserError
}
Command was aborted by the user
func (AbortedError) Error ¶
func (f AbortedError) Error() string
type BaseError ¶
type BaseError struct {
Obj ObjectReference
Encapsulated error // in case this error encapsulates an error from a lower level
// contains filtered or unexported fields
}
func (*BaseError) AddStackTrace ¶
func (*BaseError) StackFrames ¶
func (f *BaseError) StackFrames() []go_errors.StackFrame
type ChecksumMismatchError ¶
type ChecksumMismatchError struct {
TransferError
Name string // (optional) Name of file
Expected string
Actual string
}
Checksum mismatch when downloading or uploading a file
func (ChecksumMismatchError) Error ¶
func (f ChecksumMismatchError) Error() string
type CordCtlError ¶
type FieldDoesNotExistError ¶
User specified a field name that is not valid
func (FieldDoesNotExistError) Error ¶
func (f FieldDoesNotExistError) Error() string
type FilterRequiredError ¶
type FilterRequiredError struct {
UserError
}
Command requires a filter be specified
func (FilterRequiredError) Error ¶
func (f FilterRequiredError) Error() string
type IllegalQueryError ¶
User specified a query string that is not properly formatted
func (IllegalQueryError) Error ¶
func (f IllegalQueryError) Error() string
type InternalError ¶
type InternalError struct {
UnexpectedError
Message string
}
InternalError is a catch-all for errors that don't fit somewhere else
func NewInternalError ¶
func NewInternalError(format string, params ...interface{}) *InternalError
func (InternalError) Error ¶
func (f InternalError) Error() string
type InvalidInputError ¶
InvalidInputError is a catch-all for user mistakes that aren't covered elsewhere
func NewInvalidInputError ¶
func NewInvalidInputError(format string, params ...interface{}) *InvalidInputError
func (InvalidInputError) Error ¶
func (f InvalidInputError) Error() string
type ModelNotFoundError ¶
type ModelNotFoundError struct {
UserError
}
A model was not found
func (ModelNotFoundError) Error ¶
func (f ModelNotFoundError) Error() string
type NoMatchError ¶
type NoMatchError struct {
UserError
}
Command was aborted by the user
func (NoMatchError) Error ¶
func (f NoMatchError) Error() string
type ObjectReference ¶
func (*ObjectReference) Clause ¶
func (f *ObjectReference) Clause() string
Returns " on model ModelName [id]" if the reference is populated, or "" otherwise.
func (*ObjectReference) IsValid ¶
func (f *ObjectReference) IsValid() bool
Returns true if the reference is populated
func (*ObjectReference) String ¶
func (f *ObjectReference) String() string
type PermissionDeniedError ¶
type PermissionDeniedError struct {
UserError
}
Permission Denied
func (PermissionDeniedError) Error ¶
func (f PermissionDeniedError) Error() string
type TransferError ¶
type TransferError struct {
BaseError
}
func (TransferError) ShouldDumpStack ¶
func (f TransferError) ShouldDumpStack() bool
type TypeConversionError ¶
type TypeConversionError struct {
UnexpectedError
Source string
Destination string
}
We failed to type convert something that we thought should have converted
func (TypeConversionError) Error ¶
func (f TypeConversionError) Error() string
type UnavailableError ¶
type UnavailableError struct {
}
Unavailable
func (UnavailableError) Error ¶
func (f UnavailableError) Error() string
type UnexpectedError ¶
type UnexpectedError struct {
BaseError
}
func (UnexpectedError) ShouldDumpStack ¶
func (f UnexpectedError) ShouldDumpStack() bool
type UnknownModelStateError ¶
User specified a model state that is not valid
func (UnknownModelStateError) Error ¶
func (f UnknownModelStateError) Error() string
type UnknownModelTypeError ¶
User specified a model type that is not valid
func (UnknownModelTypeError) Error ¶
func (f UnknownModelTypeError) Error() string
type VersionConstraintError ¶
Version did not match a constraint
func (VersionConstraintError) Error ¶
func (f VersionConstraintError) Error() string