Contain a throw from the application's logger instead of letting it escape

This commit is contained in:
2026-09-04 11:33:20 +02:00
parent 80530c6265
commit 2e422c7584
5 changed files with 51 additions and 10 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ import { errorFrom } from './error-from.ts';
import { optionalParamsMinVersion } from './defs/constants.ts';
import { bindCarries, bindCommands, defaultSystemId, defaults } from './session-options.ts';
import { isResp, pduReturn } from './pdu.ts';
import { silentLog } from './log.ts';
import { guardedLog } from './log.ts';
import { submitSms, unsent } from './send-sms.ts';
import { ConcatReference } from './udh.ts';
@@ -106,7 +106,7 @@ export class Session extends EventEmitter<SessionEvents> {
constructor(options: SessionOptions) {
super({ captureRejections: true });
this.log = options.log ?? silentLog;
this.log = guardedLog(options.log);
this.options = options;
this.dlrMerger = new DlrMerger({
log: this.log,