Exception: AJIMS::LTI::XmlParseException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ajims/lti/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, msg = "Failed to parse XML") ⇒ XmlParseException

Returns a new instance of XmlParseException.



4
5
6
7
# File 'lib/ajims/lti/exceptions.rb', line 4

def initialize(content, msg = "Failed to parse XML")
  super(msg)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



3
4
5
# File 'lib/ajims/lti/exceptions.rb', line 3

def content
  @content
end

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



3
4
5
# File 'lib/ajims/lti/exceptions.rb', line 3

def original_exception
  @original_exception
end

Instance Method Details

#to_sObject



9
10
11
12
13
# File 'lib/ajims/lti/exceptions.rb', line 9

def to_s
  error = super
  error << "\nDOCUMENT:\n#{@content}\nEND OF DOCUMENT\n"
  error
end