errors

package
v0.0.0-...-63bff7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlerError

type CrawlerError interface {
	// Type 用于获得错误的类型。
	Type() ErrorType
	// Error 用于获得错误提示信息。
	Error() string
}

CrawlerError 代表爬虫错误的接口类型。

func NewCrawlerError

func NewCrawlerError(errType ErrorType, errMsg string) CrawlerError

NewCrawlerError 用于创建一个新的爬虫错误值。

func NewCrawlerErrorBy

func NewCrawlerErrorBy(errType ErrorType, err error) CrawlerError

NewCrawlerErrorBy 用于根据给定的错误值创建一个新的爬虫错误值。

type ErrorType

type ErrorType string

ErrorType 代表错误类型。

const (
	// ERROR_TYPE_DOWNLOADER 代表下载器错误。
	ERROR_TYPE_DOWNLOADER ErrorType = "downloader error"
	// ERROR_TYPE_ANALYZER 代表分析器错误。
	ERROR_TYPE_ANALYZER ErrorType = "analyzer error"
	// ERROR_TYPE_PIPELINE 代表条目处理管道错误。
	ERROR_TYPE_PIPELINE ErrorType = "pipeline error"
	// ERROR_TYPE_SCHEDULER 代表调度器错误。
	ERROR_TYPE_SCHEDULER ErrorType = "scheduler error"
)

错误类型常量。

type IllegalParameterError

type IllegalParameterError struct {
	// contains filtered or unexported fields
}

IllegalParameterError 代表非法的参数的错误类型。

func NewIllegalParameterError

func NewIllegalParameterError(errMsg string) IllegalParameterError

NewIllegalParameterError 会创建一个IllegalParameterError类型的实例。

func (IllegalParameterError) Error

func (ipe IllegalParameterError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL