Repository navigation
Expand file tree
/
Copy pathPHPError.d.ts
More file actions
160 lines (160 loc) · 6.22 KB
/
Copy pathPHPError.d.ts
File metadata and controls
160 lines (160 loc) · 6.22 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
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
import type { PHPEngine } from "../PHPEngine.js";
import type { PHPContext } from "../PHPContext.js";
import { SYMBOL_PHP_NAME, SYMBOL_PHP_INIT, SYMBOL_PHP_NEW } from "./Reflection.js";
export interface PHPStackFrame {
file: string;
line: number;
function?: string;
class?: string;
type?: string;
args?: any[];
}
export declare class PHPError extends Error {
static readonly E_ERROR = 1;
static readonly E_WARNING = 2;
static readonly E_PARSE = 4;
static readonly E_NOTICE = 8;
static readonly E_CORE_ERROR = 16;
static readonly E_CORE_WARNING = 32;
static readonly E_COMPILE_ERROR = 64;
static readonly E_COMPILE_WARNING = 128;
static readonly E_USER_ERROR = 256;
static readonly E_USER_WARNING = 512;
static readonly E_USER_NOTICE = 1024;
static readonly E_STRICT = 2048;
static readonly E_RECOVERABLE_ERROR = 4096;
static readonly E_DEPRECATED = 8192;
static readonly E_USER_DEPRECATED = 16384;
static readonly E_ALL = 32767;
phpCode: number;
phpFile: string;
phpLine: number;
phpTrace: PHPStackFrame[];
previous: PHPError | null;
rawJSStack: string;
constructor(messageArg?: any, codeArg?: any, fileArg?: any, lineArg?: any, traceArg?: any, previousArg?: any);
static wrapJSError(err: any): PHPError;
static [SYMBOL_PHP_NEW](ctx: any, messageArg?: any, codeArg?: any, previousArg?: any): Promise<PHPError>;
static [SYMBOL_PHP_INIT](ctx: any, obj: PHPError): Promise<void>;
__construct(ctx: any, messageArg?: any, codeArg?: any, previousArg?: any): Promise<void>;
getMessage(): string;
getmessage(): string;
getCode(): number;
getcode(): number;
getFile(): string;
getfile(): string;
getLine(): number;
getline(): number;
getPrevious(): PHPError | null;
getprevious(): PHPError | null;
gettrace(): PHPStackFrame[];
gettraceasstring(): string;
static virtualizeJSStack(jsStack: string, phpFile?: string, phpLine?: number, phpTrace?: PHPStackFrame[]): string;
getPHPStackTraceString(): string;
}
export declare class PHPException extends PHPError {
static [SYMBOL_PHP_NAME]: string;
constructor(messageArg?: any, codeArg?: any, previousArg?: any);
}
export declare class InvalidArgumentException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class BadMethodCallException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class DomainException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class LengthException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class LogicException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class OutOfRangeException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class OverflowException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class RangeException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class RuntimeException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class UnderflowException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class UnexpectedValueException extends PHPException {
static [SYMBOL_PHP_NAME]: string;
}
export declare class ErrorException extends PHPError {
static [SYMBOL_PHP_NAME]: string;
severity: number;
constructor(message?: string, code?: number, severity?: number, file?: string, line?: number, previous?: any);
__construct(ctx: any, messageArg?: any, codeArg?: any, severityArg?: any, fileArg?: any, lineArg?: any, previousArg?: any): Promise<void>;
getSeverity(): number;
getseverity(): number;
}
export declare class PHPTypeError extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPValueError extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPParseError extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPFatalError extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPNotice extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPWarning extends PHPError {
static [SYMBOL_PHP_NAME]: string;
}
export declare class PHPExit extends PHPError {
status: any;
constructor(status?: any);
}
export declare class ErrorRuntime {
static debug_backtrace(ctx: PHPContext): Promise<any>;
static debug_print_backtrace(ctx: PHPContext): Promise<string>;
static set_error_handler(ctx: PHPContext, handlerArg: any, levelsArg?: any): Promise<any>;
static restore_error_handler(ctx: PHPContext): Promise<boolean>;
static trigger_error(ctx: PHPContext, messageArg: any, levelArg?: any): Promise<boolean>;
static error_reporting(ctx: PHPContext, levelArg?: any): Promise<number>;
static functions: {
debug_backtrace: typeof ErrorRuntime.debug_backtrace;
debug_print_backtrace: typeof ErrorRuntime.debug_print_backtrace;
set_error_handler: typeof ErrorRuntime.set_error_handler;
restore_error_handler: typeof ErrorRuntime.restore_error_handler;
trigger_error: typeof ErrorRuntime.trigger_error;
user_error: typeof ErrorRuntime.trigger_error;
error_reporting: typeof ErrorRuntime.error_reporting;
};
static classes: {
exception: typeof PHPException;
errorexception: typeof ErrorException;
invalidargumentexception: typeof PHPException;
badmethodcallexception: typeof PHPException;
domainexception: typeof PHPException;
lengthexception: typeof PHPException;
logicexception: typeof PHPException;
outofrangeexception: typeof PHPException;
overflowexception: typeof PHPException;
rangeexception: typeof PHPException;
runtimeexception: typeof PHPException;
underflowexception: typeof PHPException;
unexpectedvalueexception: typeof PHPException;
error: typeof PHPError;
typeerror: typeof PHPTypeError;
parseerror: typeof PHPParseError;
fatalerror: typeof PHPFatalError;
warning: typeof PHPWarning;
notice: typeof PHPNotice;
};
static register(engine: PHPEngine): void;
}