Re: Bizarre Problem Involving EuSQL
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 12, 2005
- 555 views
Ron Weidner wrote: > > > Nevertheless, if export TERM=ansi doesn't work, > > > ... > > > > What does that do? Where do I enter it? I went to > > telnet and did that in the directory of the program > > but it didn't seem to change anything. > > Hmm... the "export TERM=ansi" sets the terminal > interface to "ansi". These days it's something else > by default. > > This issue is one of few reasons I don't use euphoria > as my first choice for cgi programming. The problem, > as you are discovering, is that error messages are > being sent to a new terminal created by euphoria. So, > error messages, aren't getting sent out to stdout. > Therefore, they aren't displayed in the web browser. > This makes debugging much more difficult. (although > ex.err helps) Some people actually consider this type > of behavior a security feature as error messages can > give hackers clues. > > Maybe there is flag/switch or something that I don't > know about to force errors to go to stdout instead of > a new terminal? Anyone? My TERM is xterm by default, and that works fine for me. If my CGI program catches an application-detected error, I call my own small Euphoria routine that outputs some HTML to the Web browser (i.e. via standard output). If the Euphoria interpreter detects an error, I use a crash routine (new in 2.5) to handle the error. Usually I send myself an e-mail, including ex.err. If there's no crash routine, then on some Linux systems, such as mine, the operating system will capture the interpreter's message that normally goes to stderr, (e.g. "subscript out of bounds") as well as the trace-back, and will e-mail it to my user id on the Linux system. Some other debugging techniques: with profile - see ex.pro with trace / trace(3) - see ctrace.out Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com