Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello All,
I have written a code "auto_runner.pl" which invokes another script "embed.pl".
embed.pl script in turn opens an xterm and sends messages on this xterm. I want to catch the error thrown in this xterm. Zenity tags are used to highlight error when embed.pl comes across one.
Also that I have no control of changing the code in embed.pl since it is someone's else's code I am using...
Please suggest which direction should I proceed.
Looks clueless to me.
sub CIrc_check{ my %SETUP=%{$_[0]}; print "\033[33m Embed.pl invoked\033[0m\n"; my $link=$SETUP{SVN}; my $output_path=$SETUP{LOCATION_OF_OUTPUT}; my $model_name=$SETUP{MODEL_NAME}; $output_path=$output_path."/"."EMBED_RESULT"; `mkdir $output_path`; chdir $output_path or die "Can't cd to $output_path : $!\n"; `xterm -e embed.pl -link $link &`; #When embed.pl strikes with an error in link or something it evaluated + it throws zenity tag sayin error in model name or so }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catching errors from embedded script in parent script
by zentara (Cardinal) on Jun 09, 2012 at 10:06 UTC |