lib/osm/term.rb in osm-1.0.6 vs lib/osm/term.rb in osm-1.2.0
- old
+ new
@@ -102,20 +102,20 @@
# Get the current term for a given section
# @param [Osm::Api] api The api to use to make the request
# @param [Osm::Section, Fixnum, #to_i] section The section (or its ID) to get terms for
# @!macro options_get
# @return [Osm::Term, nil] The current term or nil if the user can not access that section
- # @raise [Osm::Error] If the term doesn't have a Term which is current
+ # @raise [Osm::Error::NoCurrentTerm] If the Section doesn't have a Term which is current
def self.get_current_term_for_section(api, section, options={})
section_id = section.to_i
terms = get_for_section(api, section_id, options)
return nil if terms.nil?
terms.each do |term|
return term if term.current?
end
- raise Osm::Error, 'There is no current term for the section.'
+ raise Osm::Error::NoCurrentTerm, 'There is no current term for the section.'
end
# Create a term in OSM
# @param [Osm::Api] api The api to use to make the request
# @param [Hash] options - the configuration of the new term