Author: reebalazs
Date: Wed Aug 29 10:58:34 2007
New Revision: 46134
Modified:
kukit/kukit.js/trunk/kukit/oper.js
Log:
Replace string exceptions with proper ones
Modified: kukit/kukit.js/trunk/kukit/oper.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/oper.js (original)
+++ kukit/kukit.js/trunk/kukit/oper.js Wed Aug 29 10:58:34 2007
@@ -90,7 +90,7 @@
;;; if (restricted && checkKey(key)) {
;;; kukit.E = 'Illegal update on oper object, protected attribute [';
;;; kukit.E += key + '].';
-;;; throw kukit.E;
+;;; throw new Error(kukit.E);
;;; }
var value = dict[key];
if (typeof(value) != 'function') {
@@ -129,7 +129,7 @@
;;; kukit.E = 'Wrong parameter : [' + key + '] starts with ';
;;; kukit.E += '"kss"; normal parms (that do not start with';
;;; kukit.E += ' "kss") only are allowed in action-client keys.';
- throw kukit.E;
+ throw new Error(kukit.E);
} break;
}
}
@@ -172,7 +172,7 @@
;;; kukit.E = 'Wrong parameter : [' + key + '] starts with "kss";';
;;; kukit.E += ' normal parms (that do not start with kss)';
;;; kukit.E += ' only are allowed in action-default keys.';
-;;; throw kukit.E;
+;;; throw new Error(kukit.E);
;;; }
//
var namespace = this.binderInstance.__eventNamespace__;
@@ -184,7 +184,7 @@
;;; kukit.E = 'Could not trigger event [' + name;
;;; kukit.E += '] from namespace [' + namespace + '], because this';
;;; kukit.E += ' event has no default method registered.';
-;;; throw kukit.E;
+;;; throw new Error(kukit.E);
;;; }
} else {
// Put defaultParameters to parms!
@@ -209,7 +209,7 @@
;;; kukit.E = 'Wrong parameter : [' + key + '] starts with "kss";';
;;; kukit.E += ' normal parms (that do not start with kss)';
;;; kukit.E += ' only are allowed in action-server keys.';
-;;; throw kukit.E;
+;;; throw new Error(kukit.E);
;;; }
;;; }
// oper will be accessible to some commands that execute in return
@@ -299,7 +299,7 @@
;;; if (typeof(this.parms[next]) == 'undefined') {
;;; kukit.E = 'Missing mandatory parameter [' + next;
;;; kukit.E += '] in [' + errname + '].';
-;;; throw kukit.E;
+;;; throw new Error(kukit.E);
;;; }
newParameters[next] = this.parms[next];
}
@@ -316,7 +316,7 @@
;;; if (allow_excess) {
newParameters[key] = this.parms[key];
;;; } else {
-;;; throw 'Excess parameter [' + key + '] in [' + errname + '].';
+;;; throw new Error('Excess parameter [' + key + '] in [' +
errname + '].');
;;; }
}
}
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins