Documentation
¶
Index ¶
- func BuiltinCallError(root, call ast.Node, name string, invokerAncestors []ast.Node) (title, message string, ok bool)
- func CallArgTypeError(root, call, compDef ast.Node, invokerAncestors []ast.Node) (title, message string, ok bool)
- func CallArgsError(root, compCall ast.Node, invokerAncestors []ast.Node) (title, message string, ok bool)
- func CallSignature(root, frame, compDef ast.Node, invokerAncestors []ast.Node) string
- func DisallowedURLSchemeError(scheme string) (title, message string)
- func InfiniteCallError(name string) (title, message string)
- func InlineCompValueError(compName string, compDef ast.Node) (title, message string, ok bool)
- func InvalidParamDefinition(compDef ast.Node) (string, bool)
- func IsBlockComponent(compDef ast.Node) bool
- func ParamCompCallError(root, paramRef ast.Node, value ast.ResolvedValue, compDef ast.Node, ...) (title, message string, ok bool)
- func ParamRefValueError(paramName string, value ast.ResolvedValue, accessors []ast.ValueAccessor) (title, message string, ok bool)
- type ErrorWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltinCallError ¶ added in v0.7.0
func BuiltinCallError(root, call ast.Node, name string, invokerAncestors []ast.Node) (title, message string, ok bool)
BuiltinCallError returns the error of a call to the built-in component name. call is the call or the parameter reference that renders the built-in, and its arguments, explicit or bound, are resolved with invokerAncestors as for ast.ResolveFrameParam.
func CallArgTypeError ¶ added in v0.7.0
func CallArgTypeError(root, call, compDef ast.Node, invokerAncestors []ast.Node) (title, message string, ok bool)
CallArgTypeError returns the error of a call to the local or global component compDef whose arguments forwarded from a parameter (`n = value`, `n = items[0]`) resolve to a value of the wrong type. invokerAncestors are as for ast.ResolveCompCallArgValue.
func CallArgsError ¶ added in v0.7.0
func CallArgsError(root, compCall ast.Node, invokerAncestors []ast.Node) (title, message string, ok bool)
CallArgsError returns the error of a component call whose arguments, including values inside arrays, records and bound arguments, use a context key that is not injected. invokerAncestors are as for ast.ResolveCompCallArgValue.
func CallSignature ¶ added in v0.7.0
CallSignature identifies what a frame renders: the definitions the component parameters of compDef resolve to for frame. frame is a component call or a parameter reference that renders compDef, and invokerAncestors are as for ast.ResolveFrameParam. Entering compDef again with the same signature while it is being rendered never ends.
func DisallowedURLSchemeError ¶ added in v0.7.0
DisallowedURLSchemeError returns the error of a LINK or IMAGE argument or a markdown link URL whose scheme is not http, https, mailto or tel.
func InfiniteCallError ¶ added in v0.7.0
InfiniteCallError returns the error of a call to the component name that enters a component already being rendered with the same signature.
func InlineCompValueError ¶ added in v0.7.0
InlineCompValueError returns the error of a parameter reference unit that renders the component compDef inline.
func InvalidParamDefinition ¶ added in v0.7.0
InvalidParamDefinition returns the first invalid parameter definition of a local or global component definition. It returns false for any other node.
func IsBlockComponent ¶ added in v0.7.0
IsBlockComponent reports whether the component compDef is a block component.
func ParamCompCallError ¶ added in v0.7.0
func ParamCompCallError(root, paramRef ast.Node, value ast.ResolvedValue, compDef ast.Node, invokerAncestors []ast.Node) (title, message string, ok bool)
ParamCompCallError returns the error of a call through a component parameter, paramRef, that renders the component value. compDef is the local or global definition the value resolved to, nil if there is none. invokerAncestors are as for ast.ResolveCompCallArgValue.
func ParamRefValueError ¶ added in v0.7.0
func ParamRefValueError(paramName string, value ast.ResolvedValue, accessors []ast.ValueAccessor) (title, message string, ok bool)
ParamRefValueError returns the error of a parameter reference unit whose parameter resolved to value. accessors are the accessors of the reference.
Types ¶
type ErrorWrapper ¶
func DefaultErrorWrapper ¶
func DefaultErrorWrapper() ErrorWrapper