Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rb] Add backtrace locations and cause to errors #14170

Merged
merged 42 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3ff3559
Add backtrace locations and cause to errors
aguspe Jun 22, 2024
eb6aa00
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 22, 2024
ec6f5bc
Add type support and save value to variable
aguspe Jun 22, 2024
6540f73
Merge branch 'fix_backtrace_location' of github.com:aguspe/selenium i…
aguspe Jun 22, 2024
777a8a6
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 22, 2024
6883b0a
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 22, 2024
6a76481
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 22, 2024
0447c6d
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 23, 2024
4aae5a3
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 24, 2024
7e4a2cf
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 24, 2024
3c7b386
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 24, 2024
c4e2593
Resolve conflicts and update the error class
aguspe Jun 25, 2024
de16eec
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 26, 2024
4afe312
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 26, 2024
33bd311
Update implementation
aguspe Jun 26, 2024
48cb412
Merge branch 'fix_backtrace_location' of github.com:aguspe/selenium i…
aguspe Jun 26, 2024
10791b2
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 26, 2024
5139bbf
Remove unused methods
aguspe Jun 26, 2024
d798475
Merge branch 'fix_backtrace_location' of github.com:aguspe/selenium i…
aguspe Jun 26, 2024
2996653
Error has cause, backtrace and backtrace locations
aguspe Jun 27, 2024
05cfce6
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 27, 2024
ada5081
Remove english
aguspe Jun 27, 2024
7529157
Merge branch 'fix_backtrace_location' of github.com:aguspe/selenium i…
aguspe Jun 27, 2024
3c64035
Remove unnecessary attributes
aguspe Jun 27, 2024
5c9808a
Return ex
aguspe Jun 27, 2024
176286c
Fix line issue
aguspe Jun 27, 2024
48a7105
Add backtrace back
aguspe Jun 27, 2024
ef832d5
Fix types
aguspe Jun 27, 2024
1f1dcae
Add caller
aguspe Jun 27, 2024
c36c565
Merge branch 'trunk' into fix_backtrace_location
aguspe Jun 28, 2024
7497293
Address review comment
aguspe Jun 28, 2024
2f8b9f7
Include backtrace on the cause
aguspe Jun 29, 2024
a506504
Update types
aguspe Jun 29, 2024
c7bc5d2
Merge branch 'trunk' into fix_backtrace_location
aguspe Jul 5, 2024
32536f5
Merge branch 'trunk' into fix_backtrace_location
aguspe Jul 7, 2024
eb0248e
Merge branch 'trunk' into fix_backtrace_location
aguspe Jul 11, 2024
9ff8252
Merge branch 'trunk' into fix_backtrace_location
aguspe Jul 12, 2024
ea9f4b4
Merge branch 'trunk' into fix_backtrace_location
aguspe Jul 13, 2024
ac8e22a
Improve error types
aguspe Jul 13, 2024
bfedee9
Improve error types
aguspe Jul 13, 2024
834a678
Improve add cause
aguspe Jul 16, 2024
0ef5372
Roll back backtrace on message
aguspe Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rb/lib/selenium/webdriver/remote/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def assert_ok
end

def add_cause(ex, error, backtrace)
raise Error::WebDriverError, backtrace
rescue Error::WebDriverError
raise ex
cause = Error::WebDriverError.new(backtrace)
cause.set_backtrace(backtrace)
aguspe marked this conversation as resolved.
Show resolved Hide resolved
raise ex, cause: cause
rescue Error.for_error(error)
ex
end
Expand Down
2 changes: 1 addition & 1 deletion rb/sig/lib/selenium/webdriver/common/error.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Selenium
URLS: Hash[Symbol, String]

class WebDriverError < StandardError
def initialize: (?String msg) -> void
def initialize: (?String | Array[String] msg) -> void

def class_name: -> Symbol?
end
Expand Down