mirror of
https://git.hibas.dev/OpenServer/NodeLogging.git
synced 2025-07-01 12:41:11 +00:00
Fixing error, when passing empty error
This commit is contained in:
@ -125,6 +125,7 @@ export class LoggingBase {
|
||||
}
|
||||
|
||||
error(error: Error | string) {
|
||||
if (!error) error = "Empty ERROR was passed, so no informations available";
|
||||
if (typeof error === "string") {
|
||||
let e = new Error()
|
||||
this.message(LoggingTypes.Error, [error, "\n", e.stack]);
|
||||
|
Reference in New Issue
Block a user