Re: Redirecting ex.err to STDOUT

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:
> 
> duke normandin wrote:
> > 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...
> 
> }}}
<eucode>
> include machine.e
> object IsDebugMode
> IsDebugMode = getenv("DEBUGMODE")
> if equal(IsDebugMode, "on") then
>     if platform() > 2 then
>         crash_file("/dev/tty")
>     else
>         crash_file("con:")
>     end if
>     crash_message(" ** PROGRAM CRASHED ** at ")
> end if
> </eucode>
{{{

> 
> Then run the script with 
> (windows)
>   SET DEBUGMODE=on 
> 
> or
> (bash)
>   DEBUGMODE=on; export DEBUGMODE
> 
> to get the messages on screen. Set it 'off' (or don't set it) to get the
> ex.err
> file instead.
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell

It's after midnight here in Alberta, Canada, and I'm tired as hell,
otherwise I'd be trying out the above code not now, but right now. As it is
it'll have to keep until later. Thanks a lot. Later...
--
duke

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu