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 6cef890fbc
commit 77458d700b
+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)) {