| Class | RSS::NotWellFormedError |
| In: |
lib/rss/parser.rb
|
| Parent: | Error |
| element | [R] | |
| line | [R] |
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.
# File lib/rss/parser.rb, line 14
14: def initialize(line=nil, element=nil)
15: message = "This is not well formed XML"
16: if element or line
17: message << "\nerror occurred"
18: message << " in #{element}" if element
19: message << " at about #{line} line" if line
20: end
21: message << "\n#{yield}" if block_given?
22: super(message)
23: end