git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c762aa
)
Throw exceptions when OpenID login fails
author
Christian Weiske
<cweiske@cweiske.de>
Mon, 29 Oct 2012 19:58:42 +0000
(20:58 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Mon, 29 Oct 2012 19:58:42 +0000
(20:58 +0100)
www/login.php
patch
|
blob
|
history
diff --git
a/www/login.php
b/www/login.php
index 5782521bf25dadb2239d422c3fe7524ff714bc63..fbd337dbd7edba95a63a3f8167c0a00771b57965 100644
(file)
--- a/
www/login.php
+++ b/
www/login.php
@@
-100,10
+100,12
@@
try {
$status = "<tr><td>Status:</td><td><font color='green'>SUCCESS!";
$status .= " ({$result->getAssertionMethod()})</font></td></tr>";
} else {
$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) {
$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>";
}
$status = "<tr><td>Status:</td><td><font color='red'>EXCEPTION!";
$status .= " ({$e->getMessage()} : {$e->getCode()})</font></td></tr>";
}