JSDOC/Walker2.js
authorAlan Knowles <alan@akkbhome.com>
Thu, 15 Jul 2010 23:50:44 +0000 (07:50 +0800)
committerAlan Knowles <alan@akkbhome.com>
Thu, 15 Jul 2010 23:50:44 +0000 (07:50 +0800)
JSDOC/Walker2.js

index 6bf413c..e2af130 100644 (file)
@@ -490,7 +490,11 @@ Walker2 = XObject.define(
                     
                     if (this.currentDoc) {
                             print(this.ts.dump(this.ts.cursor-20, this.ts.cursor+20));
-                            throw "Unhandled doc (TOKfunction)" + token.toString();
+                            throw {
+                                name: "ArgumentError", 
+                                message: "Unhandled doc (TOKfunction)" + token.toString()
+                            };
+                            
                             //this.addSymbol(this.currentDoc.getTag('class')[0].name, true);
 
                             //throw "Unconsumed Doc: (TOKrbrace)" + this.currentDoc.toSource();
@@ -642,7 +646,11 @@ Walker2 = XObject.define(
                     
                     
                     print(this.ts.dump(this.ts.cursor-20, this.ts.cursor+20));
-                    throw "dont know how to handle function syntax??";
+                    throw {
+                        name: "ArgumentError", 
+                        message: "dont know how to handle function syntax??"
+                    };
+            
                     
                     continue;
                     
@@ -844,9 +852,13 @@ Walker2 = XObject.define(
                     _s = _s.replace(/\.prototype.*$/, '');
                     if (typeof(this.symbols[_s]) == 'undefined') {
                         //print("Symbol:" + _s);
-                        //print(this.currentDoc.src);
-                        
-                        throw "Trying to append symbol, but no doc available";
+                    //print(this.currentDoc.src);
+                        throw {
+                            name: "ArgumentError", 
+                            message: "Trying to append symbol, but no doc available"
+                        };
+
+                     
                     }
                         
                     for (var i =0; i < this.currentDoc.tags.length;i++) {