summaryrefslogtreecommitdiff
path: root/js/codeq/robot.js
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-03-31 11:56:00 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-03-31 11:57:53 +0200
commit63f4ef494b32f08ee6709c6040374bb9ed9c5da8 (patch)
tree9c25db5766b0186f8383f6dd2963e87879d852c6 /js/codeq/robot.js
parentdb069df32e29029e26602ac40e7cdfeb10a55b24 (diff)
Clean up more error functions
Diffstat (limited to 'js/codeq/robot.js')
-rw-r--r--js/codeq/robot.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/codeq/robot.js b/js/codeq/robot.js
index 5936d56..bf9200f 100644
--- a/js/codeq/robot.js
+++ b/js/codeq/robot.js
@@ -42,9 +42,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
codeq.loadProblemData(ref, data).then(function (problem) {
enterFun(problem.generalProblemData, data.commonDef, problem.solution);
})
- .fail(function (reason) {
- codeq.log.error('Failed to obtain the problem definition: ' + reason, reason);
- alert('Failed to obtain the problem definition: ' + reason);
+ .fail(function (error) {
+ var message = 'Could not obtain problem definition: ' + error.message;
+ codeq.log.error(message, error);
+ alert(message);
history.back();
})
.done();