Преглед на файлове

Create custom exception

tags/v0.4.5
Adrian Short преди 6 години
родител
ревизия
1354202538
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. +2
    -0
      lib/uk_planning_scraper.rb
  2. +1
    -1
      lib/uk_planning_scraper/authority.rb

+ 2
- 0
lib/uk_planning_scraper.rb Целия файл

@@ -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 Целия файл

@@ -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


Зареждане…
Отказ
Запис