| 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 15
15: def initialize(line=nil, element=nil)
16: message = "This is not well formed XML"
17: if element or line
18: message << "\nerror occurred"
19: message << " in #{element}" if element
20: message << " at about #{line} line" if line
21: end
22: message << "\n#{yield}" if block_given?
23: super(message)
24: end