report_error
Description:
[ Version ( since = "2.36" ) ]
public static void report_error (Object? source_object, TaskReadyCallback callback, void* source_tag, owned Error error)
public static void report_error (Object? source_object, TaskReadyCallback callback, void* source_tag, owned Error error)
Creates a Task and then immediately calls return_error on it.
Use this in the wrapper function of an asynchronous method when you want to avoid even calling the virtual method. You can then use is_tagged in the finish method wrapper to check if the result there is tagged as having been created by the wrapper method, and deal with it appropriately if so.
See also report_new_error.
Parameters:
source_object |
the Object that owns this task, or null. |
callback | |
source_tag |
an opaque pointer indicating the source of this task |
error |
error to report |
callback_data |
user data passed to |