Exception: CMDB::BadData

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

Overview

Malformed data was encountered in the CMDB or in an app’s filesystem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, context = nil) ⇒ BadData

Returns a new instance of BadData.

Parameters:

  • url (URI)

    filesystem or network location of the bad value

  • context (String) (defaults to: nil)

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



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

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

Instance Attribute Details

#urlURI (readonly)

Returns filesystem or network location of the bad data.

Returns:

  • (URI)

    filesystem or network location of the bad data



62
63
64
# File 'lib/cmdb.rb', line 62

def url
  @url
end