Skip to content

Commit

Permalink
Merge pull request #999 from randoum/master
Browse files Browse the repository at this point in the history
Adding simple description to NotSupportedByDriverError exceptions
  • Loading branch information
jnicklas committed Mar 10, 2013
2 parents 729020e + 6038130 commit f5475f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/capybara/driver/base.rb
Expand Up @@ -20,31 +20,31 @@ def html
end

def execute_script(script)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script'
end

def evaluate_script(script)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script'
end

def save_screenshot(path, options={})
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot'
end

def response_headers
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers'
end

def status_code
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code'
end

def within_frame(frame_handle)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_frame'
end

def within_window(handle)
raise Capybara::NotSupportedByDriverError
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_window'
end

def invalid_element_errors
Expand Down
8 changes: 4 additions & 4 deletions lib/capybara/driver/node.rb
Expand Up @@ -70,21 +70,21 @@ def disabled?
end

def path
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
end

def trigger(event)
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
end

def inspect
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
rescue NotSupportedByDriverError, 'Capybara::Driver::Node#inspect'
%(#<#{self.class} tag="#{tag_name}">)
end

def ==(other)
raise NotSupportedByDriverError
raise NotSupportedByDriverError, 'Capybara::Driver::Node#=='
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/node/element.rb
Expand Up @@ -221,7 +221,7 @@ def reload

def inspect
%(#<Capybara::Element tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError
rescue NotSupportedByDriverError, 'Capybara::Node::Element#inspect'
%(#<Capybara::Element tag="#{tag_name}">)
end
end
Expand Down

0 comments on commit f5475f1

Please sign in to comment.