SQL: Log process ID in errors for easier debugging

This commit is contained in:
Mia 2025-11-23 19:39:22 -06:00
parent 1ee0986f67
commit 8bae904193

View File

@ -169,6 +169,7 @@ export class SQLDatabaseManager extends QueryProcessManager<DatabaseQuery, any>
if (!this.isParentProcess) this.setupDatabase();
}
private onError(err: Error, query: DatabaseQuery) {
err.message += ` [process ${process.pid}]`
if (this.options.onError) {
const result = this.options.onError(err, query, false);
if (result) return result;