mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-11-22 13:29:23 +00:00
Adding theoretical stack to string errors
This commit is contained in:
parent
11bc947205
commit
932eeacb86
@ -48,7 +48,8 @@ class Logging {
|
|||||||
}
|
}
|
||||||
static error(error) {
|
static error(error) {
|
||||||
if (typeof error === "string") {
|
if (typeof error === "string") {
|
||||||
Logging.errorMessage(error);
|
let e = new Error();
|
||||||
|
Logging.errorMessage(error + e.stack);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// let m = "";
|
// let m = "";
|
||||||
|
File diff suppressed because one or more lines are too long
1
out/test.d.ts
vendored
1
out/test.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export {};
|
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAClC,mCAAqC;AAErC,eAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACnB,eAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1C,eAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACvC,eAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAClC,eAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAE/C,eAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAA;AAE7F,IAAI,GAAG,GAAG,IAAI,KAAK,EAAE,CAAA;AACrB,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;IAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;AAE/E,eAAO,CAAC,MAAM,GAAG,KAAK,CAAC;AACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;IAC5B,eAAO,CAAC,GAAG,CAAC,oBAAW,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;CACjD"}
|
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAClC,mCAAqC;AAErC,eAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACnB,eAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1C,eAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACvC,eAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAClC,eAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAE/C,eAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAA;AAE7F,IAAI,GAAG,GAAG,IAAI,KAAK,EAAE,CAAA;AACrB,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC;IAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAA;AAE/E,eAAO,CAAC,MAAM,GAAG,KAAK,CAAC;AACvB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7B,eAAO,CAAC,GAAG,CAAC,oBAAW,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;AAClD,CAAC"}
|
@ -70,7 +70,8 @@ export class Logging {
|
|||||||
|
|
||||||
static error(error: Error | string) {
|
static error(error: Error | string) {
|
||||||
if (typeof error === "string") {
|
if (typeof error === "string") {
|
||||||
Logging.errorMessage(error);
|
let e = new Error()
|
||||||
|
Logging.errorMessage(error + e.stack);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// let m = "";
|
// let m = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user