-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from CircleOfNice/errorCodeMapping
Version 0.2-dev: ErrorCodeMapping
- Loading branch information
Showing
84 changed files
with
4,229 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class AbortedByCallbackException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Aborted by callback. A callback returned "abort" to libcurl.'; | ||
$code = 42; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Aborted by callback. A callback returned "abort" to libcurl.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class AgainException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Socket is not ready for send/recv wait till it\'s ready and try again. This return code is only returned from curl_easy_recv and curl_easy_send'; | ||
$code = 81; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Socket is not ready for send/recv wait till it\'s ready and try again. ' . | ||
'This return code is only returned from curl_easy_recv and curl_easy_send.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class BadContentEncodingException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Unrecognized transfer encoding'; | ||
$code = 61; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Unrecognized transfer encoding.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class BadDownloadResumeException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'The download could not be resumed because the specified offset was out of the file boundary.'; | ||
$code = 36; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'The download could not be resumed because the specified offset was out of the file boundary.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class BadFunctionArgumentException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Internal error. A function was called with a bad parameter.'; | ||
$code = 43; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Internal error. A function was called with a bad parameter.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class ChunkFailedException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Chunk callback reported error'; | ||
$code = 88; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Chunk callback reported error.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of CiRestClientBundle. | ||
* | ||
* CiRestClientBundle is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* CiRestClientBundle is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with CiRestClientBundle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Ci\RestClientBundle\Exceptions; | ||
|
||
use Ci\RestClientBundle\Exceptions\Interfaces\DetailedExceptionInterface; | ||
|
||
/** | ||
* Specific exception for curl requests | ||
* | ||
* Explanations given in function getDetailedMessage | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class ConvFailedException extends CurlException implements DetailedExceptionInterface { | ||
|
||
/** | ||
* Sets all necessary dependencies | ||
*/ | ||
public function __construct() { | ||
$message = 'Character conversion failed'; | ||
$code = 75; | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @codeCoverageIgnore | ||
*/ | ||
public function getDetailedMessage() { | ||
return 'Character conversion failed.'; | ||
} | ||
} |
Oops, something went wrong.