-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexceptions.stub.php
More file actions
75 lines (61 loc) · 1.81 KB
/
exceptions.stub.php
File metadata and controls
75 lines (61 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/** @generate-class-entries */
namespace Async;
/**
* Exception thrown when a Coroutine is canceled.
* Code inside the Coroutine must properly handle this exception to ensure graceful termination.
*/
class AsyncCancellation extends \Cancellation {}
/**
* Exception thrown when an awaited operation is cancelled by a cancellation token.
* Wraps the original exception from the token as $previous.
*/
class OperationCanceledException extends AsyncCancellation {}
/**
* Common type of exception.
*/
class AsyncException extends \Exception {}
/**
* General exception for input/output operations.
* Can be used with sockets, files, pipes, and other I/O descriptors.
*/
class InputOutputException extends \Exception {}
/**
* Exception for Dns related errors: getaddrinfo and getnameinfo.
*/
class DnsException extends \Exception {}
/**
* Exception thrown when a timeout occurs.
*/
class TimeoutException extends \Exception {}
/**
* Exception thrown when a poll operation fails.
*/
class PollException extends \Exception {}
/**
* Exception thrown when a deadlock is detected.
*/
class DeadlockError extends \Error {}
/**
* Exception thrown when a service is unavailable.
* Used by circuit breaker when the circuit is open (INACTIVE state).
*/
class ServiceUnavailableException extends AsyncException {}
/**
* Exception that can contain multiple exceptions.
* Used when multiple exceptions occur in finally handlers.
* @strict-properties
*/
final class CompositeException extends \Exception
{
private array $exceptions;
/**
* Add an exception to the composite.
*/
public function addException(\Throwable $exception): void {}
/**
* Get all exceptions stored in this composite.
* @return array Array of Throwable objects
*/
public function getExceptions(): array {}
}