Documentation
¶
Index ¶
- Variables
- func Append(err error, errs ...error) error
- func NewMissingFieldError(name string) error
- func Wrap(err error, element interface{}) error
- func WrapIndex(err error, element interface{}, index int) error
- func WrapPath(err error, element interface{}, path string) error
- type Error
- type Level
- type List
- type MissingFieldError
- type ParseAttrError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // core ErrMissingID = errors.New("resource ID MUST be greater than zero") ErrDuplicatedID = errors.New("IDs MUST be unique among all resources under same Model") ErrMissingResource = errors.New("resource MUST be defined prior to referencing") ErrDuplicatedIndices = errors.New("indices v1, v2 and v3 MUST be distinct") ErrIndexOutOfBounds = errors.New("index is bigger than referenced slice") ErrInsufficientVertices = errors.New("mesh MUST contain at least 3 vertices to form a solid body") ErrInsufficientTriangles = errors.New("mesh MUST contain at least 4 triangles to form a solid body") ErrComponentsPID = errors.New("MUST NOT assign pid to objects that contain components") ErrOPCPartName = errors.New("part name MUST conform to the syntax specified in the OPC specification") ErrOPCRelTarget = errors.New("relationship target part MUST be included in the 3MF document") ErrOPCDuplicatedRel = errors.New("there MUST NOT be more than one relationship of a given type from one part to a second part") ErrOPCContentType = errors.New("part MUST use an appropriate content type specified") ErrOPCDuplicatedTicket = errors.New("each model part MUST attach no more than one PrintTicket") ErrOPCDuplicatedModelName = errors.New("model part names MUST be unique") ErrMetadataName = errors.New("names without a namespace MUST be restricted to predefined values") ErrMetadataNamespace = errors.New("namespace MUST be declared on the model") ErrMetadataDuplicated = errors.New("names MUST NOT be duplicated") ErrOtherItem = errors.New("MUST NOT reference objects of type other") ErrNonObject = errors.New("MUST NOT reference non-object resources") ErrRequiredExt = errors.New("unsupported required extension") ErrEmptyResourceProps = errors.New("resource properties MUST NOT be empty") ErrRecursion = errors.New("MUST NOT contain recursive references") ErrInvalidObject = errors.New("MUST contain a mesh or components") ErrMeshConsistency = errors.New("mesh has non-manifold edges without consistent triangle orientation") )
Error guards.
Functions ¶
func Append ¶
Append is a helper function that will append more errors onto an List in order to create a larger multi-error.
If err is not a errors.List, then it will be turned into one. If any of the errs are errors.List, they will be flattened one level into err.
func NewMissingFieldError ¶
Types ¶
type List ¶
type List struct {
Errors []error
}
List is an error type to track multiple errors. This is used to accumulate errors in cases and return them as a single "error".
type MissingFieldError ¶
type MissingFieldError struct {
Name string
}
func (*MissingFieldError) Error ¶
func (e *MissingFieldError) Error() string
type ParseAttrError ¶
func NewParseAttrError ¶
func NewParseAttrError(name string, required bool) *ParseAttrError
func (*ParseAttrError) Error ¶
func (e *ParseAttrError) Error() string
Click to show internal directories.
Click to hide internal directories.