| 1 |
lars |
1 |
<?php
|
|
|
2 |
/*******************************************************************************
|
|
|
3 |
* Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
*
|
|
|
6 |
* You may not use this file except in compliance with the License.
|
|
|
7 |
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
|
|
|
8 |
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
|
9 |
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
10 |
* specific language governing permissions and limitations under the License.
|
|
|
11 |
* *****************************************************************************
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
/**
|
|
|
17 |
* Checkout By Service Exception provides details of errors
|
|
|
18 |
* returned by Checkout By Service service
|
|
|
19 |
*
|
|
|
20 |
*/
|
|
|
21 |
class CheckoutByAmazon_Service_RequestException extends CheckoutByAmazon_Service_Exception
|
|
|
22 |
|
|
|
23 |
{
|
|
|
24 |
|
|
|
25 |
/**
|
|
|
26 |
* Constructs CheckoutByAmazon_Service_Exception
|
|
|
27 |
* @param array $ErrorInfo details of exception.
|
|
|
28 |
* Keys are:
|
|
|
29 |
* <ul>
|
|
|
30 |
* <li>Message - (string) text message for an exception</li>
|
|
|
31 |
* <li>StatusCode - (int) HTTP status code at the time of exception</li>
|
|
|
32 |
* <li>ErrorCode - (string) specific error code returned by the service</li>
|
|
|
33 |
* <li>ErrorType - (string) Possible types: Sender, Receiver or Unknown</li>
|
|
|
34 |
* <li>RequestId - (string) request id returned by the service</li>
|
|
|
35 |
* <li>XML - (string) compete xml response at the time of exception</li>
|
|
|
36 |
* <li>Exception - (Exception) inner exception if any</li>
|
|
|
37 |
* </ul>
|
|
|
38 |
*
|
|
|
39 |
*/
|
|
|
40 |
public function __construct($errorCode, $message, $statusCode, $errorType,$requestId, $xml )
|
|
|
41 |
{
|
|
|
42 |
$this->_message = $message;
|
|
|
43 |
// parent::__construct($message);
|
|
|
44 |
$ErrorInfo["StatusCode"] = $statusCode;
|
|
|
45 |
$ErrorInfo["ErrorCode"] = $errorCode;
|
|
|
46 |
$ErrorInfo["ErrorType"] = $errorType;
|
|
|
47 |
$ErrorInfo["RequestId"] = $requestId;
|
|
|
48 |
$ErrorInfo["XML"]= $xml;
|
|
|
49 |
parent::__construct($ErrorInfo);
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
?>
|