code: function(str) {
        var type, res;
  
        str = str || '';
        res = str.match(/(uncaught)?\s?(\w+)\:/i);
        type = (res) ? res[2] : null;
  
        return type;
      }
docs: #parseMessage(String str)
  - Tries to parse an error string
  Practically impossible in IE since they have localized errors