Exception: NJTransit::GTFSNotImportedError

Inherits:
Error
  • Object
show all
Defined in:
lib/njtransit/error.rb

Overview

GTFS not imported

Instance Attribute Summary

Attributes inherited from Error

#response

Instance Method Summary collapse

Constructor Details

#initialize(detected_path: nil) ⇒ GTFSNotImportedError

Returns a new instance of GTFSNotImportedError.



41
42
43
44
45
46
47
48
# File 'lib/njtransit/error.rb', line 41

def initialize(detected_path: nil)
  message = "GTFS data not found. Run: rake njtransit:gtfs:import[/path/to/bus_data]"
  if detected_path
    message += "\n\nDetected GTFS files at: #{detected_path}"
    message += "\nHint: rake njtransit:gtfs:import[#{detected_path}]"
  end
  super(message)
end