|
1 | 1 | module Concurrent |
2 | 2 |
|
| 3 | + Error = Class.new(StandardError) |
| 4 | + |
3 | 5 | # Raised when errors occur during configuration. |
4 | | - ConfigurationError = Class.new(StandardError) |
| 6 | + ConfigurationError = Class.new(Error) |
5 | 7 |
|
6 | 8 | # Raised when an asynchronous operation is cancelled before execution. |
7 | | - CancelledOperationError = Class.new(StandardError) |
| 9 | + CancelledOperationError = Class.new(Error) |
8 | 10 |
|
9 | 11 | # Raised when a lifecycle method (such as `stop`) is called in an improper |
10 | 12 | # sequence or when the object is in an inappropriate state. |
11 | | - LifecycleError = Class.new(StandardError) |
| 13 | + LifecycleError = Class.new(Error) |
12 | 14 |
|
13 | 15 | # Raised when an attempt is made to violate an immutability guarantee. |
14 | | - ImmutabilityError = Class.new(StandardError) |
| 16 | + ImmutabilityError = Class.new(Error) |
15 | 17 |
|
16 | 18 | # Raised when an object's methods are called when it has not been |
17 | 19 | # properly initialized. |
18 | | - InitializationError = Class.new(StandardError) |
| 20 | + InitializationError = Class.new(Error) |
19 | 21 |
|
20 | 22 | # Raised when an object with a start/stop lifecycle has been started an |
21 | 23 | # excessive number of times. Often used in conjunction with a restart |
22 | 24 | # policy or strategy. |
23 | | - MaxRestartFrequencyError = Class.new(StandardError) |
| 25 | + MaxRestartFrequencyError = Class.new(Error) |
24 | 26 |
|
25 | 27 | # Raised when an attempt is made to modify an immutable object |
26 | 28 | # (such as an `IVar`) after its final state has been set. |
27 | | - MultipleAssignmentError = Class.new(StandardError) |
| 29 | + MultipleAssignmentError = Class.new(Error) |
28 | 30 |
|
29 | 31 | # Raised by an `Executor` when it is unable to process a given task, |
30 | 32 | # possibly because of a reject policy or other internal error. |
31 | | - RejectedExecutionError = Class.new(StandardError) |
| 33 | + RejectedExecutionError = Class.new(Error) |
32 | 34 |
|
33 | 35 | # Raised when any finite resource, such as a lock counter, exceeds its |
34 | 36 | # maximum limit/threshold. |
35 | | - ResourceLimitError = Class.new(StandardError) |
| 37 | + ResourceLimitError = Class.new(Error) |
36 | 38 |
|
37 | 39 | # Raised when an operation times out. |
38 | | - TimeoutError = Class.new(StandardError) |
| 40 | + TimeoutError = Class.new(Error) |
39 | 41 |
|
40 | 42 | end |
0 commit comments