Showing Untrapped Error Messages in a DOS Window

Showing Untrapped Error Messages in a DOS Window

am 23.11.2006 15:02:33 von Eric Robertson

I have a Perl program that asks for user input, does some calculations and
then outputs the results. I've compiled this program and it opens up a DOS
window for the input and then displays the results. I've arranged it so that
this DOS window remains open to display these results and any errors that I
have trapped, requiring some user input before it closes.

My problem is with any untrapped errors - the DOS window closes before these
can be read. I know that this wouldn't happen if I opened up the DOS window
first and then ran the .exe from within it but I would like it to be
possible to run the .exe program from a desktop link. Is there some way that
I could arrange for the DOS window to remain open after any such messages
are displayed?


_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Showing Untrapped Error Messages in a DOS Window

am 23.11.2006 15:05:18 von n.haigh

Quoting Eric Robertson :

> I have a Perl program that asks for user input, does some calculations and
> then outputs the results. I've compiled this program and it opens up a DOS
> window for the input and then displays the results. I've arranged it so that
> this DOS window remains open to display these results and any errors that I
> have trapped, requiring some user input before it closes.
>
> My problem is with any untrapped errors - the DOS window closes before these
> can be read. I know that this wouldn't happen if I opened up the DOS window
> first and then ran the .exe from within it but I would like it to be
> possible to run the .exe program from a desktop link. Is there some way that
> I could arrange for the DOS window to remain open after any such messages
> are displayed?
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>


you could specifiy using the shortcut that you want to execute cmd.exe with the /K switch - this switch keeps the cmd.exe window open after running
the command. Somrthing like this might work:

cmd.exe /K your_perl.exe

Nath
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Showing Untrapped Error Messages in a DOS Window

am 23.11.2006 17:11:07 von Eric Robertson

Nath

That worked perfectly - many thanks.

Eric.

-----Original Message-----
From: Nathan Haigh [mailto:N.Haigh@sheffield.ac.uk]
Sent: Thursday, November 23, 2006 2:05 PM
To: Eric Robertson
Cc: activeperl@listserv.ActiveState.com
Subject: Re: Showing Untrapped Error Messages in a DOS Window

You could specify using the shortcut that you want to execute cmd.exe with
the /K switch - this switch keeps the cmd.exe window open after running
the command. Something like this might work:

cmd.exe /K your_perl.exe

Nath

Quoting Eric Robertson :

> I have a Perl program that asks for user input, does some calculations and
> then outputs the results. I've compiled this program and it opens up a DOS
> window for the input and then displays the results. I've arranged it so
that
> this DOS window remains open to display these results and any errors that
I
> have trapped, requiring some user input before it closes.
>
> My problem is with any untrapped errors - the DOS window closes before
these
> can be read. I know that this wouldn't happen if I opened up the DOS
window
> first and then ran the .exe from within it but I would like it to be
> possible to run the .exe program from a desktop link. Is there some way
that
> I could arrange for the DOS window to remain open after any such messages
> are displayed?



_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs