From: ahoward Date: 2003-06-21T02:16:18+09:00 Subject: Re: rescuing errors.. catch-all On Sat, 21 Jun 2003, Daniel Bretoi wrote: > would this seem to be a reasonable feature request to make? it would be very > nice to be able to catch everything and be able to do with it what you like, > especially with html. this is easy to do for yourself: ~ > cat index.cgi # wrap your cgi's in a baby shell script which dups 2 as 1 #!/bin/sh cgi='foo.rb' $cgi 2>&1 ~ > cat foo.rb # *any* output from program - even from ruby failing - sent to browser #!/usr/local/bin/ruby <<| doesn't even parse |>> ~ > ./index.cgi > out; cat out # note that all errors went to stdout - e.g. displayed by browser ../foo.rb:2: parse error <<| doesn't even parse |>> ^ ../foo.rb:2: unterminated string meets end of file when index.cgi is run all output, including errors, are displayed. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 | ~ > ruby -e 'p(%.\x2d\x29..intern)' ====================================