mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 09:08:05 +02:00
vpn-editor-plugin: improve the error handling a bit
This commit is contained in:
parent
b38a5f4cb4
commit
9dbf549c64
1 changed files with 10 additions and 0 deletions
|
|
@ -246,6 +246,11 @@ nm_vpn_editor_plugin_import (NMVpnEditorPlugin *plugin,
|
|||
g_return_val_if_fail (NM_VPN_EDITOR_PLUGIN_GET_INTERFACE (plugin)->import_from_file != NULL, NULL);
|
||||
return NM_VPN_EDITOR_PLUGIN_GET_INTERFACE (plugin)->import_from_file (plugin, path, error);
|
||||
}
|
||||
|
||||
g_set_error (error,
|
||||
NM_VPN_PLUGIN_ERROR,
|
||||
NM_VPN_PLUGIN_ERROR_FAILED,
|
||||
_("the plugin does not support import capability"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -261,6 +266,11 @@ nm_vpn_editor_plugin_export (NMVpnEditorPlugin *plugin,
|
|||
g_return_val_if_fail (NM_VPN_EDITOR_PLUGIN_GET_INTERFACE (plugin)->export_to_file != NULL, FALSE);
|
||||
return NM_VPN_EDITOR_PLUGIN_GET_INTERFACE (plugin)->export_to_file (plugin, path, connection, error);
|
||||
}
|
||||
|
||||
g_set_error (error,
|
||||
NM_VPN_PLUGIN_ERROR,
|
||||
NM_VPN_PLUGIN_ERROR_FAILED,
|
||||
_("the plugin does not support export capability"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue