Hi all,
i have the following code in a c# application:

public void execscript()
{
  Process myprocess = new Process();
  try
     {
        string perl_script = "err0.pl";
        myprocess.StartInfo.FileName "c:\\perl_dev\\" +
perl_script;
        myprocess.StartInfo.CreateNoWindow = false;
        myprocess.StartInfo.WindowStyle =
ProcessWindowStyle.Maximized;
        myprocess.StartInfo.UseShellExecute = true;
        myprocess.Start();
        myprocess.WaitForExit(10000);
        EventLog.WriteEntry("exterr", "test mesg");
        myprocess.Close();
     }
catch (Exception e)
     {
        throw new System.Exception();
     }
}

I need to catch an error raised in the script.
Right now the script contains only one line:
#!perl
die("died here");
Unfortunatelly, I can catch an error like "file not
found", "no permission" BUT I CANNOT CATCH THE die().
Any idea how to do it?

Thanks,
Dan


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to