Automattic\WooCommerce\Internal\PushNotifications\Services
DriverAvailabilityService::log_throwable
Logs a swallowed throwable, distinguishing an Error from an Exception.
An Exception here usually means Jetpack answered unhappily; an Error means the call was incompatible, which is a WooCommerce problem rather than a merchant one. Both are swallowed, so the log is the only place the difference survives.
Метод класса: DriverAvailabilityService{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->log_throwable( $message, $e, ?LegacyProxy $proxy ): void;
- $message(строка) (обязательный)
- The message describing what was being determined.
- $e(Throwable) (обязательный)
- The caught throwable.
- ?LegacyProxy $proxy
- .
По умолчанию:null
Код DriverAvailabilityService::log_throwable() DriverAvailabilityService::log throwable WC 11.2.2
private function log_throwable( string $message, Throwable $e, ?LegacyProxy $proxy = null ): void {
try {
$this->write_log( $message, $e, $proxy );
} catch ( Throwable $ignored ) {
// Logging is best effort. Failing to record why something went wrong must
// never be worse than the original failure, which callers have handled.
return;
}
}