Procházet zdrojové kódy

Create custom exception

tags/v0.4.5
Adrian Short před 6 roky
rodič
revize
1354202538
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. +2
    -0
      lib/uk_planning_scraper.rb
  2. +1
    -1
      lib/uk_planning_scraper/authority.rb

+ 2
- 0
lib/uk_planning_scraper.rb Zobrazit soubor

@@ -5,4 +5,6 @@ require 'uk_planning_scraper/northgate'
require 'logger'

module UKPlanningScraper
class SystemNotSupportedError < StandardError
end
end

+ 1
- 1
lib/uk_planning_scraper/authority.rb Zobrazit soubor

@@ -45,7 +45,7 @@ module UKPlanningScraper
apps = self.scrape_northgate(authority.url, params, options)
else
# Not supported
raise "Planning system not supported for #{@name} at URL: #{@url}"
raise SystemNotSupportedError.new("Planning system not supported for #{@name} at URL: #{@url}")
end
# Post processing


Načítá se…
Zrušit
Uložit