PHP exception handling technology, top exception handler, PHP exception handling
PHP handles exceptions like Java, with Try{}catch () {}The function used to define the top-level exception handler is
Set_exception_handler("My_exception"); here
PHP handles exceptions like Java, with Try{}catch () {}
The function used to define the top-level exception handler is
Set_exception_handler ("My_exception");
The my_expection here is a developer-defined exception handler, a top-level exception
Directory
1. What is an exception2. D Introduction3. Custom Exceptions4. Multiple exceptions5. Throw the exception again6. Exception to program flow7. Top level Exception Handler8. Error code9. The SUMMARY
What is the exception.
With the advent
PHP exception Handling Exception class, exception handling Exception
An exception (Exception) is used to change the normal process of a script when a specified error occurs. What is an exception? PHP 5 provides a new approach to object-oriented
An exception (Exception) is used to change the normal flow of a script when a specified error occurs. What is an exception? PHP 5 provides a new object-oriented error-handling approach. Exception handling is used to change the normal flow of a
You will inevitably encounter some abnormal errors in programming. Reasonable handling of exceptions, so that they are not perceived by the user, is what we want to do. Share a custom exception handler method today.
Create a custom error
You can use the custom exception handler to handle all uncaught exceptions (exceptions that are not caught with Try/catch).Set_exception_handler (): Sets a user-defined exception handler that, when an uncaught exception occurs, the name of the
This article introduces the content of the PHP programmer encountered errors and anomalies in the exception, now share to everyone, the need for friends can refer to
Previous: Those years, Phper encountered errors and exceptions: The error of the
What is an exception? PHP5 provides a new object-oriented error handling method. Exception handling is used to change the normal process of the script when a specified error (Exception) occurs. if you are interested, refer to Exception) it is used
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.