From b429401790c824762c58bd8e39e8ab15ff0a7b04 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 24 May 2006 19:18:20 +0000 Subject: [PATCH] Browser Helper Object: Handle errors when micasad isn't running. --- .../common/casajar/content/casaOverlay.js | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/extensions/common/casajar/content/casaOverlay.js b/extensions/common/casajar/content/casaOverlay.js index df001536..9ce67502 100644 --- a/extensions/common/casajar/content/casaOverlay.js +++ b/extensions/common/casajar/content/casaOverlay.js @@ -102,7 +102,7 @@ function websso() } catch (err) { - logMessage(err); + logMessage(err); } @@ -118,7 +118,7 @@ function websso() sKey = para.item(j).name; logMessage('Getting: ' + secretId + ':' + sKey); - theValue = new String; + theValue = new String; res = obj.miCASAReadKey(secretId, sKey, theValue); if (res == 0) @@ -243,10 +243,18 @@ function promptuser() res = obj.miCASAReadKey(secretID, ele.item(i).name, theValue); } catch (err) - { - res = -803; + { + if (err.toString().indexOf("fcdd") > 0) + { + logMessage("fcdd found"); + res = -803; + } + else + { + logMessage("fcdd not found"); + } } - + if (res == 0) { if (theValue.value == ele.item(i).value) @@ -255,8 +263,11 @@ function promptuser() break; } } - - + else if (res == -803) + { + logMessage("CASA Services not available"); + return; + } } catch (err) { bIsLogin = 'false'; @@ -382,7 +393,10 @@ function promptuser() } catch (err) { + alert('CASA services not available'); logMessage(err); + window.close(); + return; } } }