get_post_metareturns a custom field value, but if that custom field/post meta does not exist, it returns an error value.
save_postand throw an exception, it may not be caught due to this expectation, so do not throw exceptions unless you're sure you know what you're doing.
WP_Errorobject is a catch all error message object returned by some APIs. It has internal storage for multiple error messages and error codes.
WP_Errorobject, and also checks for a handful of other error values. It returns a true or false value, allowing checks such as these:
WP_Errorobject, but does not check for other error values. It's shorthand for
if ( get_class( $variable ) == 'WP_Error' ). For example: