lib/spf/error.rb in spf-0.0.23 vs lib/spf/error.rb in spf-0.0.24
- old
+ new
@@ -14,10 +14,16 @@
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; end # Redundant acceptable records found
+ class RedundantAcceptableRecordsError < RecordSelectionError # Redundant acceptable records found
+ attr_accessor :records
+ def initialize(message, records=[])
+ @records = records
+ super(message)
+ end
+ end
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