Throw exceptions when OpenID login fails
authorChristian Weiske <cweiske@cweiske.de>
Mon, 29 Oct 2012 19:58:42 +0000 (20:58 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 29 Oct 2012 19:58:42 +0000 (20:58 +0100)
www/login.php

index 5782521..fbd337d 100644 (file)
@@ -100,10 +100,12 @@ try {
         $status  = "<tr><td>Status:</td><td><font color='green'>SUCCESS!";
         $status .= " ({$result->getAssertionMethod()})</font></td></tr>";
     } else {
+        throw new Exception('Error logging in');
         $status  = "<tr><td>Status:</td><td><font color='red'>FAIL!";
         $status .= " ({$result->getAssertionMethod()})</font></td></tr>";
     }
 } catch (OpenID_Exception $e) {
+    throw new Exception('Error logging in');
     $status  = "<tr><td>Status:</td><td><font color='red'>EXCEPTION!";
     $status .= " ({$e->getMessage()} : {$e->getCode()})</font></td></tr>";
 }