From 314156ca1e62f71ad9b619858deda566f39c560a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 23 Sep 2016 11:50:02 +0200 Subject: [PATCH] ReferenceError'ised two more JS throw statements --- attract/static/js/tasks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attract/static/js/tasks.js b/attract/static/js/tasks.js index 44b4be8..1f4db6f 100644 --- a/attract/static/js/tasks.js +++ b/attract/static/js/tasks.js @@ -99,7 +99,7 @@ function shot_open(shot_id) { */ function task_create(shot_id, project_url, task_type) { if (shot_id === undefined || project_url === undefined || task_type === undefined) { - throw "task_create(" + shot_id + ", " + project_url+ ", " + task_type + ") called."; + throw new ReferenceError("task_create(" + shot_id + ", " + project_url+ ", " + task_type + ") called."); } var url = '/attract/' + project_url + '/tasks/create'; @@ -125,7 +125,7 @@ function attract_form_save(form_id, item_id, item_save_url, options={}) { // Mandatory option. if (typeof options.type === 'undefined') { - throw 'attract_form_save(): options.type is mandatory.'; + throw new ReferenceError('attract_form_save(): options.type is mandatory.'); } var $form = $('#' + form_id);