MDL-41630 oauth: Throw exception instead of dying on error

This commit is contained in:
Frederic Massart
2013-09-06 10:48:15 +08:00
parent 0bd9f000b7
commit 5a45f5fd84
+1 -3
View File
@@ -228,9 +228,7 @@ class oauth_helper {
// oauth_token_secret
$result = $this->parse_result($content);
if (empty($result['oauth_token'])) {
// failed
var_dump($result);
exit;
throw new moodle_exception('Error while requesting an oauth token');
}
// build oauth authrize url
if (!empty($this->oauth_callback)) {