Re: Redirecting ex.err to STDOUT
- Posted by duke normandin <dnormandin at bsdrocksperlrolls.com> Dec 21, 2006
- 534 views
Derek Parnell wrote: > > duke normandin wrote: > > > > Hi... > > > > Does Euphoria have a way of redirecting errors to STDERR instead of writing > > to > > ex.err? > > > > Apache has been puking a bunch of "500 pages" because of my newbee syntax > > errors. It would be nice if these errors would be redirected to STDOUT or > > STDERR - preferably to the screen so that they would be obvious. Any ideas? > > TIA.... > > You didn't say if you're using Linux or Win32 but you could add these lines > to the top of your code ... > > }}} <eucode> > include machine.e > if platform() > 2 then > -- Linux, Unix > crash_file("/dev/tty") > else > -- DOS, Win32 > crash_file("con:") > end if > crash_message(" ** PROGRAM CRASHED **") > </eucode> {{{ > > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Hey Derek... I'll be using Euphoria on both FreeBSD and winDoze -- so your code suggestion is good stuff for a start. However, I want to see the contents of ex.err on-screen if I put the script in "DEBUG" mode -- something like Perl / PHP do. Ant thoughts? TIA... -- duke