Changeset 886

Show
Ignore:
Timestamp:
2008-03-13 12:36:05 (10 months ago)
Author:
MaierMan
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/chrome/content/dta/addurl.js

    r712 r886  
    130130                } 
    131131                let m; 
    132                 if ((m = url.match(/^\[(-?\d+):(-?\d+)(?::(-?\d+))?\]/))) { 
     132                if ((m = url.match(/^\[(-?\d+):(-?\d+)(?::(-?\d+))?\]/)) != null) { 
    133133                        url = url.slice(m[0].length); 
    134134                        try { 
     
    180180                        continue; 
    181181                } 
     182                if ((m = url.match(/^\[.*?]/)) != null) { 
     183                        url = url.slice(m[0].length); 
     184                        this._pats.push(new Literal(m[0])); 
     185                        continue; 
     186                } 
     187                throw new Components.Exception("Failed to parse the expression"); 
    182188        } 
    183189        if (url.length) { 
     
    424430                }                        
    425431                 
    426                 var batch = new BatchGenerator(url); 
     432                try { 
     433                        var batch = new BatchGenerator(url); 
     434                } 
     435                catch (ex) { 
     436                        Debug.dump("Cannot create batch", ex); 
     437                        return; 
     438                } 
    427439         
    428440                var rv = !('_realURL' in address) && batch.length > 1;