Browse Source

Create custom exception

tags/v0.4.5
Adrian Short 6 years ago
parent
commit
1354202538
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      lib/uk_planning_scraper.rb
  2. +1
    -1
      lib/uk_planning_scraper/authority.rb

+ 2
- 0
lib/uk_planning_scraper.rb View File

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

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


Loading…
Cancel
Save