mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
21 lines
735 B
PHP
21 lines
735 B
PHP
<?php
|
|
|
|
namespace App\Classes\Exceptions;
|
|
|
|
use App\Classes\ValueObjects\Constants\HttpStatus;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
final class ConnectionErrorException extends ServiceApiException {
|
|
public function __construct(?string $message = null, ?string $exceptionMessage = null, ?string $payload = null, ?string $exceptionTrace = null) {
|
|
Log::error($message. ": ". $exceptionMessage);
|
|
if($payload){
|
|
Log::error('Payload: '.$payload);
|
|
}
|
|
if($exceptionTrace){
|
|
Log::error($exceptionTrace);
|
|
}
|
|
parent::__construct($message ?? 'A connection error has occurred. Please check application logs for more information.',
|
|
HttpStatus::SERVER_ERROR);
|
|
}
|
|
}
|