Skip to content

Commit 0b3ca74

Browse files
committed
adjusted error messages
1 parent 75a5bcd commit 0b3ca74

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

‎v5-unity/js/opt-frontend-common.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export abstract class AbstractBaseFrontend {
182182
this.setFronendError(
183183
["Server error! Your code might have an INFINITE LOOP or be running for too long.",
184184
"The server may also be OVERLOADED. Or you're behind a FIREWALL that blocks access.",
185-
"Try again later, or <a href=\"https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md\">read this page for more info</a>."]);
185+
"Try again later. This site is provided for free with no available technical support."]);
186186
}
187187
this.doneExecutingCode();
188188
});
@@ -204,7 +204,7 @@ export abstract class AbstractBaseFrontend {
204204

205205
setFronendError(lines, ignoreLog=false) {
206206
$("#frontendErrorOutput").html(lines.map(htmlspecialchars).join('<br/>') +
207-
(ignoreLog ? '' : '<p/>Here is a list of <a target="_blank" href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">UNSUPPORTED FEATURES</a>'));
207+
(ignoreLog ? '' : '<p/>Read this list of <a target="_blank" href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">UNSUPPORTED FEATURES</a>'));
208208

209209
// log it to the server as well (unless ignoreLog is on)
210210
if (!ignoreLog) {
@@ -337,7 +337,7 @@ export abstract class AbstractBaseFrontend {
337337
this.setFronendError(
338338
["Unknown error: The server may be OVERLOADED right now; try again later.",
339339
"Your code may also contain UNSUPPORTED FEATURES that this tool cannot handle.",
340-
"Try again later, or <a href=\"https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md\">read this page for more info</a>. [#NullTrace]"]);
340+
"Try again later. This site is provided for free with no available technical support. [#NullTrace]"]);
341341
}
342342
} else {
343343
// fail-soft to prevent running off of the end of trace

‎v5-unity/js/opt-live.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export class OptLiveFrontend extends OptFrontendSharedSessions {
253253
curEntry.event === 'uncaught_exception') {
254254
assert(curEntry.exception_msg);
255255
if (curEntry.exception_msg == "Unknown error") {
256-
$("#frontendErrorOutput").html('Unknown error: <a href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">read this page for more info</a>');
256+
$("#frontendErrorOutput").html('Unknown error: <a target="_blank" href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">read this page for more info</a>');
257257

258258
} else {
259259
$("#frontendErrorOutput").html(htmlspecialchars(curEntry.exception_msg));
@@ -578,7 +578,7 @@ export class OptLiveFrontend extends OptFrontendSharedSessions {
578578
this.setFronendError(
579579
["Unknown error: The server may be OVERLOADED right now; try again later.",
580580
"Your code may also contain UNSUPPORTED FEATURES that this tool cannot handle.",
581-
"<a href=\"https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md\">read this page for more info</a> [#NullTrace]"]);
581+
"[#NullTrace]"]);
582582
}
583583
} else {
584584
this.prevVisualizer = this.myVisualizer;

‎v5-unity/js/opt-shared-sessions.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,12 @@ Get live help!
11551155

11561156
p.Self.update({name: newName}); // change our own name
11571157
}
1158+
1159+
1160+
if (!this.meCreatedThisSession()) {
1161+
// 2019-03-26: display a more prominent warning here:
1162+
this.chatbotPostMsg('Thanks for helping! This service is NOT being actively maintained, so it may crash at any time. Please do not contact the site owner for technical support or feature requests.');
1163+
}
11581164
});
11591165

11601166
// someone ELSE sent a chat
@@ -1714,8 +1720,7 @@ Get live help!
17141720
$("#requestHelpBtn").hide();
17151721

17161722
// 2019-03-26: display a more prominent warning here:
1717-
this.chatbotPostMsg('This service is NOT being actively maintained anymore, so it may crash at any time. It is available as-is for free with no technical support. Do not contact the owner to make any requests for new features.');
1718-
1723+
this.chatbotPostMsg('This service is NOT being actively maintained, so it may crash at any time. It is available for free with no technical support. Please do not contact the site owner to make any feature requests.');
17191724
} else {
17201725
alert("ERROR in getting live help. This isn't working at the moment. Please try again later.");
17211726
if (TogetherJS.running) {

‎v5-unity/js/pytutor.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ export class ExecutionVisualizer {
445445
base.append('<div style="font-size: 8pt; margin-bottom: 10px;"><a href="http://pythontutor.com" target="_blank" style="color: #3D58A2;">Python Tutor</a> by <a href="https://twitter.com/pgbovine" target="_blank" style="color: #3D58A2;">Philip Guo</a></div>');
446446
base.find('#codeFooterDocs').hide(); // cut out extraneous docs
447447
} else {
448-
// also display credits:
449-
base.append('<div style="font-size: 9pt; margin-top: 5px; margin-bottom: 10px;">Created by <a href="https://twitter.com/pgbovine" target="_blank">@pgbovine</a></div>');
448+
// also display credits: nevermind
449+
//base.append('<div style="font-size: 9pt; margin-top: 5px; margin-bottom: 10px;">Created by <a href="https://twitter.com/pgbovine" target="_blank">@pgbovine</a></div>');
450450
}
451451

452452
// not enough room for these extra buttons ...
@@ -728,7 +728,7 @@ export class ExecutionVisualizer {
728728
// render error (if applicable):
729729
if (myViz.curLineExceptionMsg) {
730730
if (myViz.curLineExceptionMsg === "Unknown error") {
731-
myViz.navControls.showError('Unknown error: <a href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">read this page for more info</a>');
731+
myViz.navControls.showError('Unknown error: <a target="_blank" href="https://github.com/pgbovine/OnlinePythonTutor/blob/master/unsupported-features.md">read this page for more info</a>');
732732
} else {
733733
myViz.navControls.showError(myViz.curLineExceptionMsg);
734734
}

0 commit comments

Comments
 (0)