chromedp/errors.go
Daniel Martí 3d3bf22ccc start the chromedp v2 refactor
First, we want all of the functionality in a single package; this means
collapsing whatever is useful into the root chromedp package.

The runner package is being replaced by the Allocator interface, with a
default implementation which starts browser processes.

The client package doesn't really have a place in the new design. The
context, allocator, and browser types will handle the connection with
each browser.

Finally, the new API is context-based, hence the addition of context.go.
The tests have been modified to build and run against the new API.
2019-04-01 12:17:28 +01:00

46 lines
1.1 KiB
Go

package chromedp
// Error is a chromedp error.
type Error string
// Error satisfies the error interface.
func (err Error) Error() string {
return string(err)
}
// Error types.
const (
// ErrInvalidDimensions is the invalid dimensions error.
ErrInvalidDimensions Error = "invalid dimensions"
// ErrNoResults is the no results error.
ErrNoResults Error = "no results"
// ErrHasResults is the has results error.
ErrHasResults Error = "has results"
// ErrNotVisible is the not visible error.
ErrNotVisible Error = "not visible"
// ErrVisible is the visible error.
ErrVisible Error = "visible"
// ErrDisabled is the disabled error.
ErrDisabled Error = "disabled"
// ErrNotSelected is the not selected error.
ErrNotSelected Error = "not selected"
// ErrInvalidBoxModel is the invalid box model error.
ErrInvalidBoxModel Error = "invalid box model"
// ErrChannelClosed is the channel closed error.
ErrChannelClosed Error = "channel closed"
// ErrInvalidHandler is the invalid handler error.
ErrInvalidHandler Error = "invalid handler"
// ErrInvalidContext is the invalid context error.
ErrInvalidContext Error = "invalid context"
)