TAILIEUCHUNG - Practical mod_perl-CHAPTER 21:Error Handling and Debugging

Tham khảo tài liệu 'practical mod_perl-chapter 21:error handling and debugging', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Page 585 Thursday November 18 2004 12 45 PM CHAPTER 21 Error Handling and Debugging Every programmer needs to know how to debug his programs. It is an easy task with plain Perl just invoke the program with the -d flag to invoke the debugger. Under mod_perl however you have to jump through a few hoops. In this chapter we explain how to correctly handle server program and user errors and how to keep your user loyal to your service by displaying good error messages. We also demonstrate how you can peek at what is going on in a mod_perl-enabled server while it is running for example monitoring the value of a global variable seeing what database connections are open tracing what modules were loaded and their paths checking the value of @INC and much more. It s been said that there s always one more bug in any given program. Bugs that show symptoms during the development cycle are usually easily found. As their number diminishes the bugs become harder to find. Subtle interactions between software components can create bugs that aren t easily reproduced. In such cases tools and techniques that can help track down the offending code come in handy. Warnings and Errors Explained The Perl interpreter distinguishes between warnings and errors. Warnings are messages that the Perl interpreter prints to STDERR or to Apache s error log under mod_ perl . These messages indicate that Perl thinks there is a problem with your code but they do not prevent the code from running. Errors are output in the same way as warnings but the program terminates after an error. For example errors occur if your code uses invalid syntax. If a die occurs outside of any exception-handling eval it behaves just like an error with a message being output and program execution terminating. For someone new to Perl programming the warning and error messages output by Perl can be confusing and worrysome. In this section we will show you how to interpret Perl s messages and how to track down and .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.