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

This commit is contained in:
Frederic Massart 2013-09-06 10:46:17 +08:00
parent ee788142f2
commit 0e6ee5e9e2

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)) {