Skip to content
  • Dan Winship's avatar
    libnm: merge device-type-specific errors into NMDeviceError · 69099f3e
    Dan Winship authored
    As with the settings, each device type was defining its own error
    type, containing either redundant or non-useful error codes. Drop all
    of the subtype-specific errors, and reduce things to just
    NM_DEVICE_ERROR_FAILED, NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, and
    NM_DEVICE_ERROR_INVALID_CONNECTION.
    
    The device-type-specific errors were only returned from their
    nm_device_connection_compatible() implementations, so this is also a
    good opportunity to simplify those, by moving duplicated functionality
    into the base NMDevice implementation, and then allowing the
    subclasses to assume that the connection has already been validated in
    their own code. Most of the implementations now just check that the
    connection has the correct type for the device (which can't be done at
    the NMDevice level since some device types (eg, Ethernet) support
    multiple connection types.)
    
    Also, make sure that all of the error messages are localized.
    69099f3e