Skip to content

Commit 6afd1a3

Browse files
authored
Add example code for AwsException containing modeled exception data
Merge pull request #736 from howardlopez/aws_exception_data
2 parents 3059948 + aaf136a commit 6afd1a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

php/example_code/s3/ErrorHandling.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
echo $e->getAwsRequestId() . "\n";
5555
echo $e->getAwsErrorType() . "\n";
5656
echo $e->getAwsErrorCode() . "\n";
57+
58+
// This dumps any modeled response data, if supported by the service
59+
// Specific members can be accessed directly (e.g. $e['MemberName'])
60+
var_dump($e->toArray());
5761
}
5862

5963
// snippet-end:[s3.php.error_handling.client]

0 commit comments

Comments
 (0)