BMLT PHP Query Client

BmltQueryException extends Exception

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
author

Patrick Joyce

since
1.0.0
example
try {
    $client->searchMeetings();
} catch (BmltQueryException $e) {
    echo "Error: " . $e->getUserMessage();

    if ($e->isRetryable()) {
        // Retry the operation
    }
}

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

Properties

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
self

isType()

public isType(string $type) : bool
Parameters
$type : string
Return values
bool

networkError()

public static networkError(string $message[, Throwable|null $previous = null ]) : self
Parameters
$message : string
$previous : Throwable|null = null
Return values
self

rateLimitError()

public static rateLimitError(string $message) : self
Parameters
$message : string
Return values
self

responseError()

public static responseError(string $message[, int $statusCode = 0 ]) : self
Parameters
$message : string
$statusCode : int = 0
Return values
self

timeoutError()

public static timeoutError(string $message[, Throwable|null $previous = null ]) : self
Parameters
$message : string
$previous : Throwable|null = null
Return values
self

validationError()

public static validationError(string $message) : self
Parameters
$message : string
Return values
self

        
On this page

Search results