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 5782521bf25dadb2239d422c3fe7524ff714bc63..fbd337dbd7edba95a63a3f8167c0a00771b57965 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>";
 }