error_create


Description:

public static Error error_create (ClientError code, string? custom_msg)

Parameters:

code

an ClientError code to create

custom_msg

custom message to use for the error; can be null

Returns:

a new Error containing an ClientError of the given code. If the custom_msg is NULL, then the error message is the one returned from error_to_string for the code, otherwise the given message is used. Returned pointer should be freed with g_error_free.