plugins: always set a proper error domain in GErrors
This commit is contained in:
@@ -91,7 +91,10 @@ grab_port (MMPluginBase *base,
|
||||
|
||||
/* The Nokia plugin cannot do anything with non-AT ports */
|
||||
if (!mm_port_probe_is_at (probe)) {
|
||||
g_set_error (error, 0, 0, "Ignoring non-AT port");
|
||||
g_set_error_literal (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_UNSUPPORTED,
|
||||
"Ignoring non-AT port");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -101,7 +104,10 @@ grab_port (MMPluginBase *base,
|
||||
driver = mm_port_probe_get_port_driver (probe);
|
||||
|
||||
if (!mm_plugin_base_get_device_ids (base, subsys, name, &vendor, &product)) {
|
||||
g_set_error (error, 0, 0, "Could not get modem product ID.");
|
||||
g_set_error_literal (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_FAILED,
|
||||
"Could not get modem product ID");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user