Can anybody have idea how to catch errors while updating plugins or themes programmatically using the class class-wp-upgrader?