Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Add exception handling into logic in the main html file.
Browse files Browse the repository at this point in the history
To handle edge cases where Usergrid.init() fails.
  • Loading branch information
DinoChiesa committed Sep 19, 2012
1 parent 8e3640a commit a942523
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
<script src="js/app.js" type="text/javascript"></script>
<script src="js/usergrid.appSDK.js" type="text/javascript"></script>
<script type="text/javascript">

//first set the org / app path
Usergrid.ApiClient.init('Apigee', 'messageeapp'); //<== update this line (organization name, application name)

try {
// first, set the org and app path.
Usergrid.ApiClient.init('Apigee', 'messageeapp');
}
catch (e) {
$('#login-section-error')
.html('There was an error initializing: ' + JSON.stringify(e));
}
</script>
</head>
<body>
Expand All @@ -26,7 +30,7 @@ <h1>Messagee</h1>
<h3>Messagee is a sample messaging app, like Twitter</h3>
<p>
<h4>Log in using your Messagee account.</h4>
Don't have an account? use our test account (username: testuser / password: testuser), or create a new one!
Don&apos;t have an account? use our test account (username: testuser / password: testuser), or create a new one!
</p>
<span id="login-section-error"></span>
<form name="form-login" id="form-login">
Expand Down

0 comments on commit a942523

Please sign in to comment.