@nestjsforge/echarts
Exceptions
Typed exception classes thrown by @nestjsforge/echarts.
All exceptions extend a base EChartsException class, making it easy to catch library-specific errors:
try {
await this.echarts.renderToBuffer(option);
} catch (err) {
if (err instanceof EChartsRenderException) {
// Rendering failed (timeout, invalid option, etc.)
}
if (err instanceof EChartsPoolException) {
// Browser pool error (pool exhausted, browser crash)
}
}| Class | Extends | Description |
|---|---|---|
| EChartsException | Error | Base exception for all ECharts errors |
| EChartsRenderException | EChartsException | Thrown when a render operation fails |
| EChartsTimeoutException | EChartsRenderException | Thrown when a render exceeds the timeout |
| EChartsPoolException | EChartsException | Thrown when the browser pool encounters an error |
| EChartsShutdownException | EChartsException | Thrown during graceful shutdown errors |
| EChartsConfigException | EChartsException | Thrown for invalid module configuration |