Originally published at: http://www.sitepoint.com/an-introduction-to-the-wp-error-class/
In any development process, errors are something that you cannot avoid, no matter how competent and thorough you are when writing your code.
As a WordPress developer, it is your job to make sure any of your code errors are being handled correctly without affecting the end user. WordPress is shipped with a basic error handling class, namely WP_Error
that can be used and integrated into your code for basic error handling.
In this tutorial, we will take a look at the basic anatomy of the WP_Error
class, how it works and most importantly, we will cover how to integrate the WP_Error
class within our application.