Exception: Git::TimeoutError
- Inherits:
-
SignaledError
- Object
- StandardError
- Error
- CommandLineError
- 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.timeout? will be true
Instance Attribute Summary collapse
-
#timeout_duration ⇒ Numeric
readonly
The amount of time the subprocess was allowed to run before being killed.
Attributes inherited from CommandLineError
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
166 167 168 169 |
# File 'lib/git/errors.rb', line 166 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
192 193 194 |
# File 'lib/git/errors.rb', line 192 def timeout_duration @timeout_duration end |
Instance Method Details
#error_message ⇒ String
The human readable representation of this error
178 179 180 |
# File 'lib/git/errors.rb', line 178 def = <<~MESSAGE.chomp #{super}, timed out after #{timeout_duration}s MESSAGE |