Skip to content

Commit

Permalink
CLDR-17662 robustness in error startup
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed May 29, 2024
1 parent 3cc6ba0 commit 1920f33
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void serveWaitingPage(HttpServletRequest request, PrintWriter out, Surve
+ " cldrBundle.showPanel('retry', '#app');\n"
+ "} catch(e) {\n"
+ " console.error(e);\n"
+ " document.getElementById('loading-err').innerText='Error: Could not CLDR ST Retry Panel. Try reloading? ' + e + '\\n' + e.stack;\n"
+ " document.getElementById('loading-err').innerText='Error: Could not load the SurveyTool startup page. Try reloading?\\n\\n' + e + '\\n' + e.stack;\n"
+ "}\n"
+ "</script>\n");
out.write("</body>");
Expand All @@ -128,9 +128,9 @@ private void writeWaitingNavbarHtml(PrintWriter out) {
"<div class=\"navbar navbar-fixed-top\" role=\"navigation\">\n"
+ " <div class=\"container\">\n"
+ " <div class=\"navbar-header\">\n"
+ " <p id=\"loading-err\" class=\"navbar-brand\">\n"
+ " <div id=\"loading-err\" class=\"navbar-brand\">\n"
+ " <a href=\"http://cldr.unicode.org\">CLDR</a> SurveyTool\n"
+ " </p>\n"
+ " </div>\n"
+ " </div>\n"
+ " <div class=\"collapse navbar-collapse navbar-right\">\n"
+ " <ul class=\"nav navbar-nav\">\n"
Expand Down Expand Up @@ -194,8 +194,9 @@ private void serveRunnningNormallyPage(
"<script>\n"
+ "function stRunGuiErr(e) {\n"
+ " console.error(e);\n"
+ " document.write('<h1>&#x26A0; Error: Could not load CLDR ST GUI. Try reloading?</h1> '"
+ " + e + '\\n<hr />\\n<pre>' + (e.stack||'') + '</pre>');\n"
+ " document.getElementById('st-run-gui').innerHTML = '<h1>&#x26A0; Error: Could not load CLDR ST GUI. Try reloading?</h1> <pre>'"
+ " + e + '</pre>\\n<hr />\\n<pre>' + (e.stack||'') + '</pre>';\n"
+ " doc"
+ "}\n"
+ "try {\n"
+ " cldrBundle.runGui()\n"
Expand Down

0 comments on commit 1920f33

Please sign in to comment.