Constructor
# new ConnectionError(msg) → {void}
This error is thrown when the application fails to establish a connection to a required service or resource
Error thrown when a connection to a service fails
Parameters:
Name | Type | Description |
---|---|---|
msg |
string
|
Error
|
The error message or Error object |
void
Example
```typescript
// Example of throwing a ConnectionError
try {
await database.connect();
} catch (error) {
throw new ConnectionError('Failed to connect to database');
}
```