![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
eval-ling code in another processby KHLeow (Novice) |
on Jun 02, 2009 at 09:03 UTC ( #767504=perlquestion: print w/replies, xml ) | Need Help?? |
KHLeow has asked for the wisdom of the Perl Monks concerning the following question:
Hello wise monks. Many thanks for helping me identify the source of the problem that is the cmd.exe QuickEdit mode last time. But now I need your wisdom again. Suppose we have two perl files, parent.pl and child.pl. We start by running parent.pl, which will start another process to run child.pl. How do I propagate the errors in child.pl to parent.pl. This is parent.pl
And this is child.pl
As you can see, what I'm trying to do is to iterate to the next loop (instead of simply die-ing) when a custom exception is caught. This works if the code inside the eval block is still in same process. However, eval does not seem to be able to catch errors that are in another process. I have tried some modules like Error and Error::TryCatch as well but nothing works.
Back to
Seekers of Perl Wisdom
|
|