Error Handling In Cgi
Contents |
RecentThreads NewestNodes Donate What'sNew on Dec 10, 2001 at 14:02UTC ( #130621=perlquestion: print w/replies, xml ) Need Help?? uwevoelker has asked for the wisdom of the Perl Monks concerning the following question: How do you handle errors in cgi script error a complex CGI-program? Especially if you use lots of own modules. I usually cgi error 500 have a subroutine called "error" in each CGI-program, but I also thought about an Error.pm. It's aim is cgi error premature end of script headers to generate an error-page. But what is with no so important errors - the script could continue. But how do I handle this? Thank you, UweComment on CGI Error Handling Replies
Cgi Error Ah01215
are listed 'Best First'. Re: CGI Error Handling by davorg (Chancellor) on Dec 10, 2001 at 15:17UTC I think it's important to differentiate between the different types of errors that you're handling. For errors that are caused by invalid user input, it's a good idea to create an error page that tells them what to correct in their input - probably including the cgi error log current input you've got and pointing out what needs to be fixed. For anything that is outside of the user's control (missing files on the server, invalid permissions, that kind of thing) I think that it's a waste of time creating clever error reporting pages. You're probably not going to give the user any information that will mean anything to him than the default web server error page and you run the risk of giving a passing cracker too much information. The "vanilla" 500 Error page is fine for most purposes. Of course, there's nothing to stop you replacing it with another that better reflects the look and feel of your site. --
Popular Scripts Submit a New Listing! Hosted Apps Plugins Marketplace Web Hosting Blog Advertise Contact Us Submit a New Listing! Scripts Ajax ASP ASP.NET cgi handler C and C++ CFML CGI and Perl Flash HTML5 Java JavaScript
Apache Cgi Handler
PHP Python Ruby on Rails Tools and Utilities Web Hosting XML Hosted Apps Ad Management Affiliate
Cgi Form Handler
Programs Auctions Audio Systems Banner Exchange Blogs Bookmark Management Calendars Chat Scripts Classified Ads Click Tracking Clocks Collections Communication Services Content Management Countdowns Counters Customer Support Database http://www.perlmonks.org/?node_id=130621 Tools Development Tools Discussion Boards E-Commerce Education Email Systems FAQ & Knowledgebase File Downloading Financial Tools Form Processors Groupware Guestbooks Human Resource Management Image Galleries Image Manipulation Interactive Stories Link Checking Link Indexing Mailing List Managers Miscellaneous Networking Tools News Publishing Password Protection Polls & Voting Postcards Quote Display Randomizing Redirection Reservation & Booking http://www.hotscripts.com/category/scripts/cgi-perl/scripts-programs/error-handling/ Searching Security Systems Site Recommendation Tests & Quizzes Top Sites URL Submitters User Authentication Web Fetching Web Rings Web Traffic Analysis Plugins Ampoliros Modules Joomla / Mambo Modules Magento Extensions Miscellaneous osCommerce Addons PostNuke Modules phpCMS Plugins PHP-Nuke Addons phpBB Modules PHProjekt Modules phpShop Modules phpWebSite Modules vBulletin Mods Wordpress Plugins Xoops Modules Design Templates CMS & Blog Templates Flash Templates HTML Templates Useful Links Recently Added Scripts Top Rated Scripts Most Popular Scripts Current location: Scripts » CGI & Perl » Scripts & Programs » Error Handling Error Handling Tweet Error Handling. Scripts & Programs. CGI & Perl. Scripts from Hot Scripts. Review before you use or buy a script! Let Hot Scripts uncover the best free, open source and commercial hot-scripts Error Handling scripts for your web site. Results 1 - 12 of 12 « » Sort listings by: Default Number of Views Total Rating Listing Name (A-Z) Listing Name (Z-A) Date Updated Show only: Free Commercial More Opt
The remote host or network may be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 03:39:30 GMT by s_ac4 (squid/3.5.20)
New in version 2.2. The cgitb module provides a special exception handler for Python scripts. (Its name is a bit misleading. It was originally designed to display extensive traceback information in HTML for CGI scripts. It was later generalized to also display this information in plain text.) After this module is activated, if an uncaught exception occurs, a detailed, formatted report will be displayed. The report includes a traceback showing excerpts of the source code for each level, as well as the values of the arguments and local variables to currently running functions, to help you debug the problem. Optionally, you can save this information to a file instead of sending it to the browser. To enable this feature, simply add this to the top of your CGI script: import cgitb cgitb.enable() The options to the enable() function control whether the report is displayed in the browser and whether the report is logged to a file for later analysis. cgitb.enable([display[, logdir[, context[, format]]]])¶ This function causes the cgitb module to take over the interpreter's default handling for exceptions by setting the value of sys.excepthook. The optional argument display defaults to 1 and can be set to 0 to suppress sending the traceback to the browser. If the argument logdir is present, the traceback reports are written to files. The value of logdir should be a directory where these files will be placed. The optional argument context is the number of lines of context to display around the current line of source code in the traceback; this defaults to 5. If the optional argument format is "html", the output is formatted as HTML. Any other value