Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Filippo committed May 30, 2014
1 parent d88ce87 commit 35a89ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions inc/plugins/MyFacebookConnect/class_facebook.php
Expand Up @@ -4,7 +4,7 @@
* A bridge between MyBB with Facebook, featuring login, registration and more.
*
* @package Main API class
* @version 2.0
* @version 2.0.2
*/

class MyFacebook
Expand Down Expand Up @@ -122,8 +122,8 @@ public function get_user($fields = '')
}
catch (FacebookApiException $e) {

// The user should have denied permissions. Still available with check_user() though. Reask for login.
$this->authenticate();
// The user should have denied permissions. Still available with check_user() though
error($lang->sprintf($lang->myfbconnect_error_report, $e->getMessage()));

}

Expand Down Expand Up @@ -185,8 +185,8 @@ private function post_on_wall($message, $link = '')
}
catch (FacebookApiException $e) {

// The user should have denied posting permissions. Reask for them.
$this->authenticate();
// The user should have denied posting permissions, but other errors might rise.
error($lang->sprintf($lang->myfbconnect_error_report, $e->getMessage()));

}

Expand Down
2 changes: 1 addition & 1 deletion inc/plugins/myfbconnect.php
Expand Up @@ -6,7 +6,7 @@
* @package MyFacebook Connect
* @author Shade <legend_k@live.it>
* @license http://opensource.org/licenses/mit-license.php MIT license
* @version 2.0
* @version 2.0.2
*/

if (!defined('IN_MYBB')) {
Expand Down

0 comments on commit 35a89ec

Please sign in to comment.