Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception namespace fixes #456

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ApiOperations/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected static function _validateParams($params = null)
. "method calls. (HINT: an example call to create a charge "
. "would be: \"Stripe\\Charge::create(['amount' => 100, "
. "'currency' => 'usd', 'source' => 'tok_1234'])\")";
throw new Error\Api($message);
throw new \Stripe\Error\Api($message);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/StripeObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public static function emptyValues($obj)
} elseif ($obj instanceof StripeObject) {
$values = $obj->_values;
} else {
throw new InvalidArgumentException(
throw new \InvalidArgumentException(
"empty_values got got unexpected object type: " . get_class($obj)
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Util/DefaultLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DefaultLogger implements LoggerInterface
public function error($message, array $context = [])
{
if (count($context) > 0) {
throw new Exception('DefaultLogger does not currently implement context. Please implement if you need it.');
throw new \Exception('DefaultLogger does not currently implement context. Please implement if you need it.');
}
error_log($message);
}
Expand Down