ValueTooLarge handling on few other places

This commit is contained in:
Jindra Petřík
2022-11-04 19:18:03 +01:00
parent 9df7940aa1
commit 4a87908cd5
2 changed files with 7 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.SWFCompression;
import com.jpexs.decompiler.flash.SWFSourceInfo;
import com.jpexs.decompiler.flash.SearchMode;
import com.jpexs.decompiler.flash.SwfOpenException;
import com.jpexs.decompiler.flash.ValueTooLargeException;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.RenameType;
import com.jpexs.decompiler.flash.abc.ScriptPack;
@@ -3615,6 +3616,9 @@ public class CommandLineArgumentParser {
ActionScript2Parser par = new ActionScript2Parser(src.getSwf(), src);
try {
src.setActions(par.actionsFromString(as));
} catch (ValueTooLargeException ex) {
System.err.println("Script or some of its functions are too large");
System.exit(1);
} catch (ActionParseException ex) {
System.err.println("%error% on line %line%".replace("%error%", ex.text).replace("%line%", Long.toString(ex.line)));
System.exit(1);