lib/spf/error.rb in spf-0.0.26 vs lib/spf/error.rb in spf-0.0.27

- old
+ new

@@ -12,29 +12,29 @@ # Miscellaneous Errors ############################################################################## class DNSError < Error; end # DNS error class DNSTimeoutError < DNSError; end # DNS timeout - class RecordSelectionError < Error; end # Record selection error - class NoAcceptableRecordError < RecordSelectionError; end # No acceptable record found - class RedundantAcceptableRecordsError < RecordSelectionError # Redundant acceptable records found - attr_accessor :records - def initialize(message, records=[]) - @records = records - super(message) - end + class RecordSelectionError < Error # Record selection error + attr_accessor :records + def initialize(message, records=[]) + @records = records + super(message) end + end + class NoAcceptableRecordError < RecordSelectionError; end # No acceptable record found + class RedundantAcceptableRecordsError < RecordSelectionError; end # Redundant acceptable records found class NoUnparsedTextError < Error; end # No unparsed text available class UnexpectedTermObjectError < Error; end # Unexpected term object encountered class ProcessingLimitExceededError < Error; end # Processing limit exceeded class MacroExpansionCtxRequiredError < OptionRequiredError; end # Missing required context for macro expansion # Parser Errors ############################################################################## class NothingToParseError < Error; end # Nothing to parse class SyntaxError < Error # Generic syntax error - attr_accessor :text, :parse_text + attr_accessor :text, :parse_text, :domain def initialize(message, text=nil, parse_text=nil) @text = text @parse_text = parse_text super(message) end