Skip to content

Commit

Permalink
add better error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud User committed Aug 8, 2023
1 parent a17bf32 commit 5cd8840
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js" integrity="sha512-CSBhVREyzHAjAFfBlIBakjoRUKp5h7VSweP0InR/pAJyptH7peuhCsqAI/snV+TwZmXZqoUklpXp6R6wMnYf5Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.9/dayjs.min.js" integrity="sha512-q4Xn+ZU2K+dqJPL8a3TiyGsDa31IkR/rLt/w+fy8jLrx8TdXj0dLM1Aq4aPXnOOKxHEya/bD9DePDB2DHm4jJQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.9/plugin/relativeTime.min.js" integrity="sha512-6RygaIDPDX6ddRU7XCHt5mE3D1z+cwvGk1OilDc91XVgqgBhgw5UgtQFZdlPSzC5IyeSKMQPzvtW+7+YFWb0TQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/69205051/jinjafx_m.js"></script>
<script src="/73874bbf/jinjafx_m.js"></script>
</head>
<body>
<div id="overlay"></div>
Expand Down
13 changes: 9 additions & 4 deletions www/jinjafx_m.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ function getStatusText(code) {
};

window.onresize();

var gExtraKeys = {
"Alt-F": "findPersistent",
"Ctrl-F": "findPersistent",
Expand Down Expand Up @@ -916,6 +916,8 @@ function getStatusText(code) {
"Ctrl-D": false,
"Cmd-D": false
};

document.body.style.display = "block";

CodeMirror.defineMode("data", cmDataMode);
window.cmData = CodeMirror.fromTextArea(data, {
Expand Down Expand Up @@ -1584,11 +1586,14 @@ function getStatusText(code) {
document.getElementById('template_info').style.visibility = 'visible';
loaded = true;
}

document.body.style.display = "block";
}
catch (e) {
document.write('<pre>' + e.stack + '</pre>');
if (e.stack.includes(e.name)) {
document.write('<pre>' + quote(e.stack) + '</pre>');
}
else {
document.write('<pre>' + quote(e.name) + ': ' + quote(e.message) + '<br />' + quote(e.stack) + '</pre>');
}
}
};

Expand Down

0 comments on commit 5cd8840

Please sign in to comment.