The code.zip compressed package contains a js test file. When using the above code var setting = CodeSettings.Pretty(); Uglify.Js(code, setting); to format js, an error is reported. The error message is $exception {"Exception_WasThrown"} System.StackOverflowException I use try catch, but the error cannot be caught, and the program crashes directly.
try{
var setting = CodeSettings.Pretty();
//Use the js file in the code.zip compressed package
Uglify.Js(code, setting);
} catch(Exception e){
//but can't catch the error
}
The main problem is that the catch cannot catch the error
code.zip
code.zip contains a js file, because the file is too large, please decompress it locally.
Executing formatting will report an error. It doesn’t matter if the error is reported, but the error cannot be caught