Exception: Roadie::InvalidUrlPath

Inherits:
Error
  • Object
show all
Defined in:
lib/roadie/errors.rb

Overview

Raised when Roadie encounters an invalid URL which cannot be parsed by Ruby’s URI class.

This could be a hint that something in your HTML or CSS is broken.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(given_path, cause = nil) ⇒ InvalidUrlPath

Returns a new instance of InvalidUrlPath.



17
18
19
20
21
22
23
24
25
# File 'lib/roadie/errors.rb', line 17

def initialize(given_path, cause = nil)
  @cause = cause
  if cause
    cause_message = " Caused by: #{cause}"
  else
    cause_message = ""
  end
  super "Cannot use path \"#{given_path}\" in URL generation.#{cause_message}"
end

Instance Attribute Details

#causeObject (readonly)

The original error, raised from URI.



15
16
17
# File 'lib/roadie/errors.rb', line 15

def cause
  @cause
end