e8122e4a26
Adds the high level WithDebugf() context option, and associated lower level browser and dial options for setting a protocol wire debugger. Additionally changes the conn.Conn.Read/Write implementations to be more efficient, using direct easyjson.{Marshal,Unmarshal} calls and logging to debug func when available.
49 lines
1.3 KiB
Go
49 lines
1.3 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 (
|
|
// ErrInvalidWebsocketMessage is the invalid websocket message.
|
|
ErrInvalidWebsocketMessage Error = "invalid websocket message"
|
|
|
|
// 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"
|
|
)
|