Class RSS::NotWellFormedError
In: rss/parser.rb
Parent: Error

Methods

new  

Attributes

element  [R] 
line  [R] 

Public Class methods

Create a new NotWellFormedError for an error at line in element. If a block is given the return value of the block ends up in the error message.

[Source]

# File rss/parser.rb, line 14
    def initialize(line=nil, element=nil)
      message = "This is not well formed XML"
      if element or line
        message << "\nerror occurred"
        message << " in #{element}" if element
        message << " at about #{line} line" if line
      end
      message << "\n#{yield}" if block_given?
      super(message)
    end

[Validate]

ruby-doc.org is a community service provided by James Britt and Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.