Displaying 1 result from an estimated 1 matches for "taskloader".
Did you mean:
task_order
2009 Sep 04
3
libxml-ruby: How to handle XML::Parser::ParseError?
Code:
require "rubygems"
require "xml"
class TaskLoader
class BadXML < RuntimeError
end
def load_tasks
doc = XML::Parser.file( "qq.xml" ).parse
# ... work with document ...
rescue XML::Parser::ParseError, BadXML # this is line #40
# ...
end
end # TaskLoader
p TaskLoader.new.load_tasks # this is line #71
Output:
re...