The EvalError object indicates an error regarding the global eval() function. This exception is not thrown by JavaScript anymore, however the EvalError object remains for compatibility.
@example
import{ EvalError }from'@w5s/error'; try{ thrownewEvalError("Hello"); }catch(e){ console.log(e instanceofRangeEvalErrorError);// true console.log(e.message);// "Hello" console.log(e.name);// "EvalError" console.log(e.stack);// Stack of the error }
Alias to native globalThis.EvalError
The EvalError object indicates an error regarding the global eval() function. This exception is not thrown by JavaScript anymore, however the EvalError object remains for compatibility.