Class: ProxyError
Defined in: src/errors/ProxyError.ts:12
Represents an error that occurs within a proxy.
This error class extends the built-in Error
class and adds a proxy
property
to track the proxy associated with the error. It also triggers custom events when the error is created.
Example
const proxyError = new ProxyError('An error occurred with the proxy', someProxyInstance);
Extends
Error
Constructors
new ProxyError()
new ProxyError(
message
,proxy
):ProxyError
Defined in: src/errors/ProxyError.ts:29
Creates an instance of the ProxyError
.
This constructor not only initializes the error message but also emits custom events
on the associated proxy's nexo
event emitter and a separate wrapper
event emitter.
Parameters
message
string
The error message to be associated with this error.
proxy
The proxy instance that is the source of the error.
Returns
Example
const proxyError = new ProxyError('An error occurred with the proxy', someProxyInstance);
// This will emit 'proxy.error' events on both the proxy's nexo emitter and wrapper.
Overrides
Error.constructor
Properties
proxy
readonly
proxy:Proxy
Defined in: src/errors/ProxyError.ts:14
The proxy instance associated with this error.