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.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.
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
174 175 176 177 |
# File 'lib/git/errors.rb', line 174 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
201 202 203 |
# File 'lib/git/errors.rb', line 201 def timeout_duration @timeout_duration end |
Instance Method Details
#error_message ⇒ String
The human readable representation of this error
187 188 189 |
# File 'lib/git/errors.rb', line 187 def = <<~MESSAGE.chomp #{super}, timed out after #{timeout_duration}s MESSAGE |