javascript 中的try catch應用總結

字號:


    
    目前我們可能得到的系統(tǒng)異常主要包含以下6種:
    EvalError: raised when an error occurs executing code in eval()
    RangeError: raised when a numeric variable or parameter is outside of its valid range
    ReferenceError: raised when de-referencing an invalid reference
    SyntaxError: raised when a syntax error occurs while parsing code in eval()
    TypeError: raised when a variable or parameter is not a valid type
    URIError: raised when encodeURI() or decodeURI() are passed invalid parameters
    javascript 中的try catch應用總結