This repository was archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMessage.php
206 lines (188 loc) · 4.2 KB
/
Message.php
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?php declare(strict_types=1);
/**
* This file is part of the phpv8/php-v8 PHP extension.
*
* Copyright (c) 2015-2018 Bogdan Padalko <thepinepain@gmail.com>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source or visit
* http://opensource.org/licenses/MIT
*/
namespace V8;
/**
* An error message.
*/
class Message
{
const ERROR_LEVEL_LOG = 1;
const ERROR_LEVEL_DEBUG = 2;
const ERROR_LEVEL_INFO = 4;
const ERROR_LEVEL_ERROR = 8;
const ERROR_LEVEL_WARNING = 16;
const ERROR_LEVEL_ALL = 31;
/**
* @var ScriptOrigin
*/
private $script_origin;
/**
* @var string
*/
private $message;
/**
* @var string
*/
private $source_line;
/**
* @var string
*/
private $resource_name;
/**
* @var StackTrace|null
*/
private $stack_trace;
/**
* @var int|null
*/
private $line_number;
/**
* @var int|null
*/
private $start_position;
/**
* @var int|null
*/
private $end_position;
/**
* @var int|null
*/
private $start_column;
/**
* @var int|null
*/
private $end_column;
/**
* @var int|null
*/
private $error_level;
/**
* @param string $message
* @param string $source_line
* @param ScriptOrigin $script_origin
* @param string $resource_name
* @param StackTrace $stack_trace
* @param int $line_number
* @param int $start_position
* @param int $end_position
* @param int $start_column
* @param int $end_column
* @param int|null $error_level
*/
public function __construct(
string $message,
string $source_line,
ScriptOrigin $script_origin,
string $resource_name,
StackTrace $stack_trace,
?int $line_number = null,
?int $start_position = null,
?int $end_position = null,
?int $start_column = null,
?int $end_column = null,
?int $error_level = null
) {
}
/**
* @return string
*/
public function get(): string
{
}
/**
* @return string
*/
public function getSourceLine(): string
{
}
/**
* Returns the origin for the script from where the function causing the
* error originates.
*
* @return ScriptOrigin
*/
public function getScriptOrigin(): ScriptOrigin
{
}
/**
* Returns the resource name for the script from where the function causing
* the error originates.
*
* @return string
*/
public function getScriptResourceName(): string
{
}
/**
* Exception stack trace. By default stack traces are not captured for
* uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows
* to change this option.
*
* @return StackTrace|null
*/
public function getStackTrace(): ?StackTrace
{
}
/**
* Returns the number, 1-based, of the line where the error occurred.
*
* @return int|null
*/
public function getLineNumber(): ?int
{
}
/**
* Returns the index within the script of the first character where
* the error occurred.
*
* @return int|null
*/
public function getStartPosition(): ?int
{
}
/**
* Returns the index within the script of the last character where
* the error occurred.
*
* @return int|null
*/
public function getEndPosition(): ?int
{
}
/**
* Returns the index within the line of the first character where
* the error occurred.
*
* @return int|null
*/
public function getStartColumn(): ?int
{
}
/**
* Returns the index within the line of the last character where
* the error occurred.
*
* @return int|null
*/
public function getEndColumn(): ?int
{
}
/**
* Returns the error level of the message.
*
* @return int|null
*/
public function getErrorLevel(): ?int
{
}
}