The iptables do_command() will simply die/exit on syntax errors, as it assumes it has been called from the command line, as we simply use/link with the iptables.c file. This have the unfortunately effect that the Perl script also dies.
The newer iptables interface (which we use since v0.51) actually supports redefining/reassigning the exit_err() function.
Look at the notes in the XS file libiptc.xs, on this exit_err() function pointer.