ScrapingException class
Exception thrown when a scraping operation fails
- Implemented types
Constructors
- ScrapingException.new(String message, {ScrapingExceptionType type = ScrapingExceptionType.unexpected, dynamic originalException, String? url, int? statusCode, bool isRetryable = true})
- Creates a new ScrapingException with the given parameters
- ScrapingException.authentication(String message, {dynamic originalException, String? url, int? statusCode, bool isRetryable = false})
-
Creates a new ScrapingException for an authentication error
factory
- ScrapingException.captcha(String message, {dynamic originalException, String? url, bool isRetryable = false})
-
Creates a new ScrapingException for a CAPTCHA detected error
factory
- ScrapingException.http(String message, {dynamic originalException, String? url, int? statusCode, bool isRetryable = true})
-
Creates a new ScrapingException for an HTTP error
factory
- ScrapingException.lazyLoading(String message, {dynamic originalException, String? url, bool isRetryable = true})
-
Creates a new ScrapingException for a lazy loading error
factory
- ScrapingException.network(String message, {dynamic originalException, String? url, bool isRetryable = true})
-
Creates a new ScrapingException for a network error
factory
- ScrapingException.pagination(String message, {dynamic originalException, String? url, bool isRetryable = true})
-
Creates a new ScrapingException for a pagination error
factory
- ScrapingException.parsing(String message, {dynamic originalException, String? url, bool isRetryable = false})
-
Creates a new ScrapingException for a parsing error
factory
- ScrapingException.permission(String message, {dynamic originalException, String? url, int? statusCode, bool isRetryable = false})
-
Creates a new ScrapingException for a permission error
factory
- ScrapingException.proxy(String message, {dynamic originalException, String? url, bool isRetryable = true})
-
Creates a new ScrapingException for a proxy error
factory
- ScrapingException.rateLimit(String message, {dynamic originalException, String? url, int? statusCode, bool isRetryable = true})
-
Creates a new ScrapingException for a rate limiting error
factory
- ScrapingException.robotsTxt(String message, {dynamic originalException, String? url, bool isRetryable = false})
-
Creates a new ScrapingException for a robots.txt disallowed error
factory
- ScrapingException.validation(String message, {dynamic originalException, String? url, bool isRetryable = false})
-
Creates a new ScrapingException for a validation error
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRetryable → bool
-
Whether this exception is retryable
final
- message → String
-
The error message
final
- originalException → dynamic
-
The original exception that caused this exception
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
The HTTP status code (if applicable)
final
- type → ScrapingExceptionType
-
The exception type
final
- url → String?
-
The URL that was being scraped
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited