Modern WordPress Development: You should throw an exception when you encounter a WP_Error
WordPress methods like wp_insert_user
don’t throw exceptions when they fail, but instead — and in some cases only if you tell the method to — return a WP_Error object. This…