Class: Git::TimeoutError
- Inherits:
-
SignaledError
- Object
- SignaledError
- Git::TimeoutError
- Defined in:
- lib/git/errors.rb
Overview
This error is raised when a git command takes longer than the configured timeout
The git command executed, status, stdout, and stderr, and the timeout duration are available from this object.
result.status.timed_out? will be true
Instance Attribute Summary collapse
-
#timeout_duration ⇒ Numeric
readonly
The amount of time the subprocess was allowed to run before being killed.
Instance Method Summary collapse
-
#error_message ⇒ String
The human readable representation of this error.
-
#initialize(result, timeout_duration) ⇒ TimeoutError
constructor
Create a TimeoutError object.
Constructor Details
#initialize(result, timeout_duration) ⇒ TimeoutError
Create a TimeoutError object
178 179 180 181 |
# File 'lib/git/errors.rb', line 178 def initialize(result, timeout_duration) @timeout_duration = timeout_duration super(result) end |
Instance Attribute Details
#timeout_duration ⇒ Numeric (readonly)
The amount of time the subprocess was allowed to run before being killed
205 206 207 |
# File 'lib/git/errors.rb', line 205 def timeout_duration @timeout_duration end |
Instance Method Details
#error_message ⇒ String
The human readable representation of this error
191 192 193 |
# File 'lib/git/errors.rb', line 191 def = <<~MESSAGE.chomp #{super}, timed out after #{timeout_duration}s MESSAGE |