summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.stub.php
blob: 5f6a3a53e4e9543c33fd1c30bfe948c907794e3e (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php

/** @generate-class-entries */

interface Throwable extends Stringable
{
    public function getMessage(): string;

    /** @return int */
    public function getCode();

    public function getFile(): string;

    public function getLine(): int;

    public function getTrace(): array;

    public function getPrevious(): ?Throwable;

    public function getTraceAsString(): string;
}

class Exception implements Throwable
{
    /** @var string */
    protected $message = "";
    /** @var string */
    private $string = "";
    /** @var int */
    protected $code = 0;
    /** @var string|null */
    protected $file = null;
    /** @var int|null */
    protected $line = null;
    private array $trace = [];
    private ?Throwable $previous = null;

    final private function __clone(): void {}

    public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}

    /** @return void */
    public function __wakeup() {}

    final public function getMessage(): string {}

    /** @return int */
    final public function getCode() {}

    final public function getFile(): string {}

    final public function getLine(): int {}

    final public function getTrace(): array {}

    final public function getPrevious(): ?Throwable {}

    final public function getTraceAsString(): string {}

    public function __toString(): string {}
}

class ErrorException extends Exception
{
    /** @var int */
    protected $severity = E_ERROR;

    public function __construct(
        string $message = "",
        int $code = 0,
        int $severity = E_ERROR,
        ?string $filename = null,
        ?int $line = null,
        ?Throwable $previous = null
    ) {}

    final public function getSeverity(): int {}
}

class Error implements Throwable
{
    /** @var string */
    protected $message = "";
    /** @var string */
    private $string = "";
    /** @var int */
    protected $code = 0;
    /** @var string|null */
    protected $file = null;
    /** @var int|null */
    protected $line = null;
    private array $trace = [];
    private ?Throwable $previous = null;

    /** @implementation-alias Exception::__clone */
    final private function __clone(): void {}

    /** @implementation-alias Exception::__construct */
    public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}

    /**
     * @return void
     * @implementation-alias Exception::__wakeup
     */
    public function __wakeup() {}

    /** @implementation-alias Exception::getMessage */
    final public function getMessage(): string {}

    /**
     * @return int
     * @implementation-alias Exception::getCode
     */
    final public function getCode() {}

    /** @implementation-alias Exception::getFile */
    final public function getFile(): string {}

    /** @implementation-alias Exception::getLine */
    final public function getLine(): int {}

    /** @implementation-alias Exception::getTrace */
    final public function getTrace(): array {}

    /** @implementation-alias Exception::getPrevious */
    final public function getPrevious(): ?Throwable {}

    /** @implementation-alias Exception::getTraceAsString */
    final public function getTraceAsString(): string {}

    /** @implementation-alias Exception::__toString */
    public function __toString(): string {}
}

class CompileError extends Error
{
}

class ParseError extends CompileError
{
}

class TypeError extends Error
{
}

class ArgumentCountError extends TypeError
{
}

class ValueError extends Error
{
}

class ArithmeticError extends Error
{
}

class DivisionByZeroError extends ArithmeticError
{
}

class UnhandledMatchError extends Error
{
}