Class: Y2Issues::InvalidValue

Inherits:
Issue
  • Object
show all
Defined in:
library/general/src/lib/y2issues/invalid_value.rb

Overview

Represents a situation where an invalid value was given

Instance Attribute Summary

Attributes inherited from Issue

#location, #message, #severity

Instance Method Summary collapse

Methods inherited from Issue

#error?

Constructor Details

#initialize(value, location:, fallback: nil, severity: :warn) ⇒ InvalidValue

Returns a new instance of InvalidValue.

Parameters:

  • location (URI, String)

    Error location ("file:/etc/sysconfig/ifcfg-eth0:BOOTPROTO")

  • value (#to_s, nil)

    Invalid value or nil if no value was given

  • fallback (#to_s) (defaults to: nil)

    Value to use instead of the invalid one



29
30
31
32
# File 'library/general/src/lib/y2issues/invalid_value.rb', line 29

def initialize(value, location:, fallback: nil, severity: :warn)
  textdomain "base"
  super(build_message(value, fallback), location: location, severity: severity)
end