Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
/ sovos-api Public archive
forked from UnlemBilisim/foribaapi

Commit

Permalink
Default Exception, SovosException ilave güncellendi.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeti committed Nov 29, 2024
1 parent 8ea05ec commit 8458f30
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/Bulut/Exceptions/SovosException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Bulut\Exceptions;

use Throwable;

class SovosException extends \Exception
{
public function __construct(string $message = '', int $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
3 changes: 2 additions & 1 deletion src/Bulut/FITApi/FITDespatchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Bulut\DespatchService\SendDespatchResponse;
use Bulut\Exceptions\GlobalForibaException;
use Bulut\Exceptions\SchemaValidationException;
use Bulut\Exceptions\SovosException;
use Bulut\Exceptions\UnauthorizedException;
use GuzzleHttp\Client;

Expand Down Expand Up @@ -201,7 +202,7 @@ protected function getXml($responseText)

throw new GlobalForibaException($fault->faultstring, (int) $fault->faultcode);
} else {
throw new \Exception("Fatal Error : Code '".$fault->faultcode."', Message '".$fault->faultstring."' [".$responseText.'].');
throw new SovosException("Fatal Error : Code '".$fault->faultcode."', Message '".$fault->faultstring."' [".$responseText.'].');
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Bulut/FITApi/FITInvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Bulut\Exceptions\GlobalForibaException;
use Bulut\Exceptions\SchemaValidationException;
use Bulut\Exceptions\SovosException;
use Bulut\Exceptions\UnauthorizedException;
use Bulut\InvoiceService\GetEnvelopeStatus;
use Bulut\InvoiceService\GetEnvelopeStatusResponse;
Expand Down Expand Up @@ -196,7 +197,7 @@ protected function getXml($responseText)

throw new GlobalForibaException($fault->faultstring, (int) $fault->faultcode);
} else {
throw new \Exception("Fatal Error : Code '".$fault->faultcode."', Message '".$fault->faultstring."' [".$responseText.'].');
throw new SovosException("Fatal Error : Code '".$fault->faultcode."', Message '".$fault->faultstring."' [".$responseText.'].');
}
}

Expand Down

0 comments on commit 8458f30

Please sign in to comment.