Skip to content

Commit

Permalink
Fixed wrong exception
Browse files Browse the repository at this point in the history
  • Loading branch information
waxim committed Jan 18, 2017
1 parent 1b79b1e commit ebe0684
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Vouchers/Bag.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ public function pickValid()
if ($result) {
$voucher = $value;
}
} catch (Exception $e) {
} catch (\Exception $e) {
continue;
}
}

if ($voucher == null) {
throw new \Vouchers\Voucher\NoValidVouchers();
throw new \Vouchers\Exceptions\NoValidVouchers();
}

return $voucher;
Expand Down
2 changes: 1 addition & 1 deletion tests/Vouchers/BagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function testCanPickWithValidatorCallback()
/**
* Test we get an error when data is invalid.
*
* @expectedException Vouchers\Exceptions\ValidationCallbackFail
* @expectedException \Vouchers\Exceptions\NoValidVouchers
*/
public function testCanFailToPickWithValidatorCallback()
{
Expand Down

0 comments on commit ebe0684

Please sign in to comment.