2009/dap/ReSpec.js/js respec.js,1.182,1.183

Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv1253

Modified Files:
	respec.js 
Log Message:
remove support for exceptions

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -d -r1.182 -r1.183
--- respec.js	4 Jan 2012 19:17:29 -0000	1.182
+++ respec.js	7 Feb 2012 16:12:56 -0000	1.183
@@ -2250,32 +2250,32 @@
                         else {
                             sn.element("div", {}, desc, [sn.element("em", {}, null, "No parameters.")]);
                         }
-                        if (it.raises.length) {
-                            var table = sn.element("table", { "class": "exceptions" }, desc);
-                            var tr = sn.element("tr", {}, table);
-                            ["Exception", "Description"].forEach(function (tit) { sn.element("th", {}, tr, tit); });
-                            for (var k = 0; k < it.raises.length; k++) {
-                                var exc = it.raises[k];
-                                var tr = sn.element("tr", {}, table);
-                                sn.element("td", { "class": "excName" }, tr, [sn.element("a", {}, null, exc.id)]);
-                                var dtd = sn.element("td", { "class": "excDesc" }, tr);
-                                if (exc.type == "simple") {
-                                    dtd.appendChild(exc.description);
-                                }
-                                else {
-                                    var ctab = sn.element("table", { "class": "exceptionCodes" }, dtd );
-                                    for (var m = 0; m < exc.description.length; m++) {
-                                        var cd = exc.description[m];
-                                        var tr = sn.element("tr", {}, ctab);
-                                        sn.element("td", { "class": "excCodeName" }, tr, [sn.element("code", {}, null, cd.id)]);
-                                        sn.element("td", { "class": "excCodeDesc" }, tr, [cd.description]);
-                                    }
-                                }
-                            }
-                        }
-                        else {
-                            sn.element("div", {}, desc, [sn.element("em", {}, null, "No exceptions.")]);
-                        }
+                        // if (it.raises.length) {
+                        //     var table = sn.element("table", { "class": "exceptions" }, desc);
+                        //     var tr = sn.element("tr", {}, table);
+                        //     ["Exception", "Description"].forEach(function (tit) { sn.element("th", {}, tr, tit); });
+                        //     for (var k = 0; k < it.raises.length; k++) {
+                        //         var exc = it.raises[k];
+                        //         var tr = sn.element("tr", {}, table);
+                        //         sn.element("td", { "class": "excName" }, tr, [sn.element("a", {}, null, exc.id)]);
+                        //         var dtd = sn.element("td", { "class": "excDesc" }, tr);
+                        //         if (exc.type == "simple") {
+                        //             dtd.appendChild(exc.description);
+                        //         }
+                        //         else {
+                        //             var ctab = sn.element("table", { "class": "exceptionCodes" }, dtd );
+                        //             for (var m = 0; m < exc.description.length; m++) {
+                        //                 var cd = exc.description[m];
+                        //                 var tr = sn.element("tr", {}, ctab);
+                        //                 sn.element("td", { "class": "excCodeName" }, tr, [sn.element("code", {}, null, cd.id)]);
+                        //                 sn.element("td", { "class": "excCodeDesc" }, tr, [cd.description]);
+                        //             }
+                        //         }
+                        //     }
+                        // }
+                        // else {
+                        //     sn.element("div", {}, desc, [sn.element("em", {}, null, "No exceptions.")]);
+                        // }
                         var reDiv = sn.element("div", {}, desc);
                         sn.element("em", {}, reDiv, "Return type: ");
                         var matched = /^sequence<(.+)>$/.exec(it.datatype);
@@ -2307,36 +2307,36 @@
                         if (it.readonly) sn.text(", readonly", dt);
                         if (it.nullable) sn.text(", nullable", dt);
                         
-                        if (it.raises.length) {
-                            var table = sn.element("table", { "class": "exceptions" }, desc);
-                            var tr = sn.element("tr", {}, table);
-                            ["Exception", "On Get", "On Set", "Description"].forEach(function (tit) { sn.element("th", {}, tr, tit); });
-                            for (var k = 0; k < it.raises.length; k++) {
-                                var exc = it.raises[k];
-                                var tr = sn.element("tr", {}, table);
-                                sn.element("td", { "class": "excName" }, tr, [sn.element("a", {}, null, exc.id)]);
-                                ["onGet", "onSet"].forEach(function (gs) {
-                                    if (exc[gs]) sn.element("td", { "class": "excGetSetTrue" }, tr, "\u2714");
-                                    else         sn.element("td", { "class": "excGetSetFalse" }, tr, "\u2718");
-                                });
-                                var dtd = sn.element("td", { "class": "excDesc" }, tr);
-                                if (exc.type == "simple") {
-                                    dtd.appendChild(exc.description);
-                                }
-                                else {
-                                    var ctab = sn.element("table", { "class": "exceptionCodes" }, dtd );
-                                    for (var m = 0; m < exc.description.length; m++) {
-                                        var cd = exc.description[m];
-                                        var tr = sn.element("tr", {}, ctab);
-                                        sn.element("td", { "class": "excCodeName" }, tr, [sn.element("code", {}, null, cd.id)]);
-                                        sn.element("td", { "class": "excCodeDesc" }, tr, [cd.description]);
-                                    }
-                                }
-                            }
-                        }
-                        else {
-                            sn.element("div", {}, desc, [sn.element("em", {}, null, "No exceptions.")]);
-                        }
+                        // if (it.raises.length) {
+                        //     var table = sn.element("table", { "class": "exceptions" }, desc);
+                        //     var tr = sn.element("tr", {}, table);
+                        //     ["Exception", "On Get", "On Set", "Description"].forEach(function (tit) { sn.element("th", {}, tr, tit); });
+                        //     for (var k = 0; k < it.raises.length; k++) {
+                        //         var exc = it.raises[k];
+                        //         var tr = sn.element("tr", {}, table);
+                        //         sn.element("td", { "class": "excName" }, tr, [sn.element("a", {}, null, exc.id)]);
+                        //         ["onGet", "onSet"].forEach(function (gs) {
+                        //             if (exc[gs]) sn.element("td", { "class": "excGetSetTrue" }, tr, "\u2714");
+                        //             else         sn.element("td", { "class": "excGetSetFalse" }, tr, "\u2718");
+                        //         });
+                        //         var dtd = sn.element("td", { "class": "excDesc" }, tr);
+                        //         if (exc.type == "simple") {
+                        //             dtd.appendChild(exc.description);
+                        //         }
+                        //         else {
+                        //             var ctab = sn.element("table", { "class": "exceptionCodes" }, dtd );
+                        //             for (var m = 0; m < exc.description.length; m++) {
+                        //                 var cd = exc.description[m];
+                        //                 var tr = sn.element("tr", {}, ctab);
+                        //                 sn.element("td", { "class": "excCodeName" }, tr, [sn.element("code", {}, null, cd.id)]);
+                        //                 sn.element("td", { "class": "excCodeDesc" }, tr, [cd.description]);
+                        //             }
+                        //         }
+                        //     }
+                        // }
+                        // else {
+                        //     sn.element("div", {}, desc, [sn.element("em", {}, null, "No exceptions.")]);
+                        // }
                     }
                     else if (type == "constant") {
                         sn.text(" of type ", dt);
@@ -2522,16 +2522,16 @@
         str += "<span class='idlAttrType'>" + this.writeDatatype(attr.datatype) + arr + nullable + "</span> ";
         for (var i = 0; i < pad; i++) str += " ";
         str += "<span class='idlAttrName'><a href='#" + curLnk + attr.refId + "'>" + attr.id + "</a></span>";
-        if (gets.length) {
-            str += " getraises (" +
-                   gets.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; }).join(", ") +
-                   ")";
-        }
-        if (sets.length) {
-            str += " setraises (" +
-                   sets.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; }).join(", ") +
-                   ")";
-        }
+        // if (gets.length) {
+        //     str += " getraises (" +
+        //            gets.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; }).join(", ") +
+        //            ")";
+        // }
+        // if (sets.length) {
+        //     str += " setraises (" +
+        //            sets.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; }).join(", ") +
+        //            ")";
+        // }
         str += ";</span>\n";
         return str;
     },
@@ -2565,12 +2565,12 @@
                                 })
                           .join(", ");
         str += ")";
-        if (meth.raises.length) {
-            str += " raises ("
-            str += meth.raises.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; })
-                              .join(", ");
-            str += ")";
-        }
+        // if (meth.raises.length) {
+        //     str += " raises ("
+        //     str += meth.raises.map(function (it) { return "<span class='idlRaises'><a>" + it.id + "</a></span>"; })
+        //                       .join(", ");
+        //     str += ")";
+        // }
         str += ";</span>\n";
         return str;
     },

Received on Tuesday, 7 February 2012 16:15:12 UTC