Use os.EOL for separating stack in error

This commit is contained in:
Koen Vlaswinkel
2023-10-23 10:37:10 +02:00
parent 78f832a73f
commit b33b5bb7c4

View File

@@ -1,3 +1,5 @@
import * as os from "os";
export class RedactableError extends Error {
constructor(
cause: ErrorLike | undefined,
@@ -27,7 +29,7 @@ export class RedactableError extends Error {
return this.fullMessage;
}
return `${this.fullMessage}\n${this.stack}`;
return `${this.fullMessage}${os.EOL}${this.stack}`;
}
public get redactedMessage(): string {