Commit cb76f5dc authored by Ivan Jose Lozano Fernandez's avatar Ivan Jose Lozano Fernandez Committed by Daniel Connolly

throwing a ScriptException when a disabled opcode found, instead of an IllegalOperation

parent 145fe965
......@@ -67,7 +67,9 @@ public class ScriptHelpers {
// opcode, e.g. OP_ADD or OP_1:
out.write(ScriptOpCodes.getOpCode(w.substring(3)));
} else {
throw new IllegalArgumentException(String.format("Invalid Data: %s", w));
// CHANGE: We throw a Disabled OPCode Exception instad of a more general IllegalArgumentEx
// throw new IllegalArgumentException(String.format("Invalid Data: %s", w));
throw new ScriptException(ScriptError.SCRIPT_ERR_DISABLED_OPCODE, String.format("Invalid Data: %s", w));
}
}
return new Script(out.toByteArray());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment