Exception: Playwright::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Playwright::Error
- Defined in:
- lib/playwright/errors.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, message:, stack:) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(name:, message:, stack:) ⇒ Error
Returns a new instance of Error.
22 23 24 25 26 27 |
# File 'lib/playwright/errors.rb', line 22 def initialize(name:, message:, stack:) super("#{name}: #{}") @name = name @message = @stack = stack end |
Class Method Details
.parse(error_payload) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/playwright/errors.rb', line 4 def self.parse(error_payload) if error_payload['name'] == 'TimeoutError' TimeoutError.new( message: error_payload['message'], stack: error_payload['stack'].split("\n"), ) else new( name: error_payload['name'], message: error_payload['message'], stack: error_payload['stack'].split("\n"), ) end end |