Add additional text to NotImplementedErrors [#6328 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
Mike Gehard 2011-02-09 06:32:40 -07:00 committed by Santiago Pastorino
parent 63c8ea9a6a
commit 58de03f077
3 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ module ActionView
# because Resolver guarantees that the arguments are present and
# normalized.
def find_templates(name, prefix, partial, details)
raise NotImplementedError
raise NotImplementedError, "Subclasses must implement a find_templates(name, prefix, partial, details) method"
end
# Helpers that builds a path. Useful for building virtual paths.

View File

@ -120,7 +120,7 @@ module ActiveModel #:nodoc:
# Override this method in subclasses with validation logic, adding errors
# to the records +errors+ array where necessary.
def validate(record)
raise NotImplementedError
raise NotImplementedError, "Subclasses must implement a validate(record) method."
end
end
@ -156,7 +156,7 @@ module ActiveModel #:nodoc:
# Override this method in subclasses with the validation logic, adding
# errors to the records +errors+ array where necessary.
def validate_each(record, attribute, value)
raise NotImplementedError
raise NotImplementedError, "Subclasses must implement a validate_each(record, attribute, value) method"
end
# Hook method that gets called by the initializer allowing verification

View File

@ -37,7 +37,7 @@ module ActiveRecord
# Implemented by subclasses
def replace(record)
raise NotImplementedError
raise NotImplementedError, "Subclasses must implement a replace(record) method"
end
def set_new_record(record)