Skip to content

Commit

Permalink
ruflin#687 Remove exception catch in Type::getDocument()
Browse files Browse the repository at this point in the history
  • Loading branch information
rmruano committed Oct 5, 2014
1 parent ffbfa5d commit 76074c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGES

2014-10-05
- Remove exception catch in Type::getDocument() #687

2014-10-04
- Release v1.3.4.0
- Update to elasticsearch 1.3.4 #691
Expand Down
8 changes: 2 additions & 6 deletions lib/Elastica/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,8 @@ public function getDocument($id, $options = array())
{
$path = urlencode($id);

try {
$response = $this->request($path, Request::GET, array(), $options);
$result = $response->getData();
} catch (ResponseException $e) {
throw new NotFoundException('doc id ' . $id . ' not found');
}
$response = $this->request($path, Request::GET, array(), $options);
$result = $response->getData();

$info = $response->getTransferInfo();
if ($info['http_code'] !== 200) {
Expand Down

0 comments on commit 76074c2

Please sign in to comment.