Exception: Rex::Parser::GraphML::Error::InvalidAttributeError

Inherits:
ParserError show all
Defined in:
lib/rex/parser/graphml.rb

Overview

An error describing an XML attribute that is invalid either because the value is missing or otherwise invalid.

Instance Method Summary collapse

Constructor Details

#initialize(element, attribute, details: nil, missing: true) ⇒ InvalidAttributeError

Returns a new instance of InvalidAttributeError.



420
421
422
423
424
425
426
427
428
429
430
# File 'lib/rex/parser/graphml.rb', line 420

def initialize(element, attribute, details: nil, missing: true)
  @element = element
  @attribute = attribute
  # whether or not the attribute is invalid because it is absent
  @missing = missing

  message = "Element '#{element}' contains an invalid attribute: '#{attribute}'"
  message << " (#{details})" unless details.nil?

  super(message)
end