BmltQueryException
extends Exception
in package
Base exception for BMLT Query Client operations.
Provides enhanced error information including error types, retry capabilities, and user-friendly messages. All exceptions thrown by the library extend this class.
Tags
Table of Contents
Constants
- TYPE_GEOCODING_ERROR = 'GEOCODING_ERROR'
- TYPE_NETWORK_ERROR = 'NETWORK_ERROR'
- TYPE_RATE_LIMIT_ERROR = 'RATE_LIMIT_ERROR'
- TYPE_RESPONSE_ERROR = 'RESPONSE_ERROR'
- TYPE_TIMEOUT_ERROR = 'TIMEOUT_ERROR'
- TYPE_VALIDATION_ERROR = 'VALIDATION_ERROR'
Properties
- $retryable : bool
- $type : string
- $userMessage : string|null
Methods
- __construct() : mixed
- geocodingError() : self
- getType() : string
- getUserMessage() : string
- isRetryable() : bool
- isType() : bool
- networkError() : self
- rateLimitError() : self
- responseError() : self
- timeoutError() : self
- validationError() : self
Constants
TYPE_GEOCODING_ERROR
public
mixed
TYPE_GEOCODING_ERROR
= 'GEOCODING_ERROR'
TYPE_NETWORK_ERROR
public
mixed
TYPE_NETWORK_ERROR
= 'NETWORK_ERROR'
TYPE_RATE_LIMIT_ERROR
public
mixed
TYPE_RATE_LIMIT_ERROR
= 'RATE_LIMIT_ERROR'
TYPE_RESPONSE_ERROR
public
mixed
TYPE_RESPONSE_ERROR
= 'RESPONSE_ERROR'
TYPE_TIMEOUT_ERROR
public
mixed
TYPE_TIMEOUT_ERROR
= 'TIMEOUT_ERROR'
TYPE_VALIDATION_ERROR
public
mixed
TYPE_VALIDATION_ERROR
= 'VALIDATION_ERROR'
Properties
$retryable read-only
private
bool
$retryable
= false
$type read-only
private
string
$type
= self::TYPE_NETWORK_ERROR
$userMessage read-only
private
string|null
$userMessage
= null
Methods
__construct()
public
__construct([string $message = '' ][, int $code = 0 ][, Throwable|null $previous = null ][, string $type = self::TYPE_NETWORK_ERROR ][, bool $retryable = false ][, string|null $userMessage = null ]) : mixed
Parameters
- $message : string = ''
- $code : int = 0
- $previous : Throwable|null = null
- $type : string = self::TYPE_NETWORK_ERROR
- $retryable : bool = false
- $userMessage : string|null = null
geocodingError()
public
static geocodingError(string $message[, Throwable|null $previous = null ]) : self
Parameters
- $message : string
- $previous : Throwable|null = null
Return values
selfgetType()
public
getType() : string
Return values
stringgetUserMessage()
public
getUserMessage() : string
Return values
stringisRetryable()
public
isRetryable() : bool
Return values
boolisType()
public
isType(string $type) : bool
Parameters
- $type : string
Return values
boolnetworkError()
public
static networkError(string $message[, Throwable|null $previous = null ]) : self
Parameters
- $message : string
- $previous : Throwable|null = null
Return values
selfrateLimitError()
public
static rateLimitError(string $message) : self
Parameters
- $message : string
Return values
selfresponseError()
public
static responseError(string $message[, int $statusCode = 0 ]) : self
Parameters
- $message : string
- $statusCode : int = 0
Return values
selftimeoutError()
public
static timeoutError(string $message[, Throwable|null $previous = null ]) : self
Parameters
- $message : string
- $previous : Throwable|null = null
Return values
selfvalidationError()
public
static validationError(string $message) : self
Parameters
- $message : string