Author: reebalazs
Date: Wed Aug 29 10:51:32 2007
New Revision: 46132

Modified:
   kukit/kukit.js/trunk/kukit/dom.js
Log:
Replace string exceptions with proper ones

Modified: kukit/kukit.js/trunk/kukit/dom.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/dom.js   (original)
+++ kukit/kukit.js/trunk/kukit/dom.js   Wed Aug 29 10:51:32 2007
@@ -76,7 +76,7 @@
     // to eliminate possible errors
     if (typeof(inNodes) != 'undefined' && inNodes == null) {
 ;;;     kukit.E = 'Selection error in kukit.dom.cssQuery';
-        throw kukit.E;
+        throw new Error(kukit.E);
     }
     return kukit.dom._cssQuery(selector, inNodes);
 };
@@ -168,10 +168,10 @@
 
 kukit.dom.getAttribute = function(node, attrname) {
     if (attrname.toLowerCase() == 'style') {
-        throw 'Style attribute is not allowed with getAttribute';
+        throw new Error('Style attribute is not allowed with getAttribute');
     }
 ;;; if (typeof(attrname) != 'string') {
-;;;     throw 'value error : attrname must be string';
+;;;     throw new Error('value error : attrname must be string');
 ;;; }
     // The code hereunder does not work for kssattr:xxx args
     // var value = node[argname];
@@ -199,7 +199,7 @@
 
 kukit.dom.setAttribute = function(node, attrname, value) {
     if (attrname.toLowerCase() == 'style') {
-        throw 'Style attribute is not allowed with setAttribute';
+        throw new Error('Style attribute is not allowed with setAttribute');
     }
     else if (attrname.toLowerCase() == 'class') {
         // The class attribute cannot be set on IE, instead
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to