Exception: CMDB::BadData

Inherits:
Error
  • Object
show all
Defined in:
lib/cmdb.rb

Overview

Malformed data was encountered in the CMDB or filesystem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, context = nil) ⇒ BadData

Returns a new instance of BadData.

Parameters:

  • source (URI)

    that contains the bad value

  • context (String) (defaults to: nil)

    brief description of where data was found e.g. ‘CMDB data file’ or ‘input config file’



69
70
71
72
# File 'lib/cmdb.rb', line 69

def initialize(uri, context = nil)
  @uri = uri
  super("Malformed data encountered #{(' in ' + context) if context}")
end

Instance Attribute Details

#uriURI (readonly)

Returns source that contains the bad data.

Returns:

  • (URI)

    source that contains the bad data



65
66
67
# File 'lib/cmdb.rb', line 65

def uri
  @uri
end