diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-01 20:51:25 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-03-01 20:51:25 +0100 |
commit | 7c72a4efe48149c20b9a3e8bb7e547214301a9f3 (patch) | |
tree | 6a8ccc3689c3bd45af1152938123246847eb4fdd /js/codeq/python.js | |
parent | bd07f69a238428849de32ec6c1e7492f6c232247 (diff) |
Remove the commError wrapper function
Diffstat (limited to 'js/codeq/python.js')
-rw-r--r-- | js/codeq/python.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/js/codeq/python.js b/js/codeq/python.js index 9fc34c8..055ada7 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -117,10 +117,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ }), activityHandler = codeq.makeActivityHandler(editor, problemDef.id), terminal = makePythonTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler), - hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'python_hints', problemDef, commonDef, activityHandler), - commError = function (error) { - alert(error); - }; + hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'python_hints', problemDef, commonDef, activityHandler); codeq.template.processDictionary(problemDef.translations.description, [problemDef.language, problemDef.group, problemDef.problem]); @@ -175,7 +172,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ terminal.append('error: ' + data.message); } }) - .fail(commError) + .fail(alert) .fin(function () { editor.setOption('readOnly', false); $(editor.getWrapperElement()).removeClass('disabled'); @@ -193,7 +190,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ 'program': program }); }) - .fail(commError) + .fail(alert) .done(); // focus the terminal jqTerminal.click(); @@ -201,7 +198,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ jqBtnStop.on('click', function () { activityHandler.queueTrace({'typ': 'python_stop'}); codeq.comms.sendPythonStop({}) - .fail(commError) + .fail(alert) .done(); }); |