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

@@ -16,6 +16,7 @@
*/
package com.jpexs.decompiler.flash.importers;
import com.jpexs.decompiler.flash.ValueTooLargeException;
import com.jpexs.decompiler.flash.action.ConstantPoolTooBigException;
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
@@ -83,6 +84,8 @@ public class AS2ScriptImporter {
ActionScript2Parser par = new ActionScript2Parser(asm.getSwf(), asm);
try {
asm.setActions(par.actionsFromString(txt));
} catch (ValueTooLargeException ex) {
logger.log(Level.SEVERE, "Script or some of its functions are too large, file: {0}", fileName);
} catch (ActionParseException ex) {
logger.log(Level.SEVERE, "%error% on line %line%, file: %file%".replace("%error%", ex.text).replace("%line%", Long.toString(ex.line)).replace("%file%", fileName), ex);
} catch (CompilationException ex) {