PHP error handling security |
09-12-2018, 12:09 AM
(This post was last modified: 09-12-2018, 12:59 AM by ciadmin. Edit Reason: seo spam link )
Errors vs. Exceptions
Many use error handling and exception handling interchangeably. When we say error handling we are referring to the process of catching errors produced by your program which needs proper action. Since PHP came into a new object-oriented (OOP) way of dealing with errors, exception handling was introduced. It is used to change the usual way of handling code execution of a specific error condition when it occurs. In this way, exception handling provides a better technique over error handling. How does exception handling in PHP work? Just like any other object-oriented programming, PHP also uses the following keywords related to exceptions: Try: this means that if the exception does not trigger, the code will just execute normally but if the exception triggers then it will call “thrown” exception Throw: every time an exception has been triggered, a “throw” exception must be paired with at least one “catch” Catch: this block of code should retrieve an exception and create an object including the exception information. **SEO spam link redacted** |
Messages In This Thread |
PHP error handling security - by Diederik Van Hoorebeke - 11-13-2015, 07:31 AM
RE: PHP error handling security - by Narf - 11-13-2015, 11:35 AM
RE: PHP error handling security - by kenjis - 11-13-2015, 03:32 PM
RE: PHP error handling security - by acemary - 12-20-2015, 02:41 AM
RE: PHP error handling security - by dibyendudas - 12-20-2015, 08:59 AM
RE: PHP error handling security - by InsiteFX - 12-21-2015, 01:43 PM
RE: PHP error handling security - by amargow - 09-12-2018, 12:09 AM
|