module Redwood
-class SourceError < StandardError; end
+class SourceError < StandardError
+ def initialize *a
+ raise "don't instantiate me!" if SourceError.is_a?(self.class)
+ super
+ end
+end
class OutOfSyncSourceError < SourceError; end
class FatalSourceError < SourceError; end
## - load_header offset
## - load_message offset
## - raw_header offset
- ## - raw_full_message offset
+ ## - raw_message offset
## - check
## - next (or each, if you prefer): should return a message and an
## array of labels.
def reset!; seek_to! start_offset; end
def == o; o.uri == uri; end
def done?; start_offset.nil? || (self.cur_offset ||= start_offset) >= end_offset; end
- def is_source_for? uri; uri == URI(uri); end
+ def is_source_for? uri; uri == @uri; end
## check should throw a FatalSourceError or an OutOfSyncSourcError
## if it can detect a problem. it is called when the sup starts up