aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-16 13:02:51 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-16 16:28:08 +0200
commit641d7c3743be440112952140ca799b6748b261c7 (patch)
treebd52a73063daa459cace130eea68666eb5e7f6f2 /lib/rhbzpage.js
parent3f70ba468a91e0f5abe20034dd50e3c63a6fcb1a (diff)
downloadbugzilla-triage-641d7c3743be440112952140ca799b6748b261c7.tar.gz
Bail out if we are not logged in.
Adding our own exception and checking it. Move configuration button to special method of BZPage. A bit of cleanup. Fixes #20 (I hope).
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r--lib/rhbzpage.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index bc3394c..fd53278 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -22,7 +22,16 @@ var tabs = require("tabs");
var RHBugzillaPage = function RHBugzillaPage(win, config) {
// inheritance ... call superobject's constructor
- BZPage.call(this, win, config);
+ try {
+ BZPage.call(this, win, config);
+ } catch (ex) {
+ if (ex instanceof require("bzpage").NotLoggedinException) {
+ console.log(ex);
+ return ; // Bail out if the user is not logged in
+ } else {
+ throw ex; // rethrow the exception otherwise
+ }
+ }
// For identification of graphics card
var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],