Skip to content

Commit 49fe125

Browse files
committed
more data types added - symbol, bigint
1 parent f3c9a11 commit 49fe125

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

dist/elmahio.js

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/elmahio.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,12 @@
10291029
if (typeof error.cause === "number" || typeof error.cause === "string" || typeof error.cause === "boolean") {
10301030
obj.ExceptionSpecific = [{ key: "cause", value: error.cause }];
10311031
}
1032+
if (typeof error.cause === "bigint") {
1033+
obj.ExceptionSpecific = [{ key: "cause", value: "BigInt(\"" + parseInt(error.cause) + "\")" }];
1034+
}
1035+
if (typeof error.cause === "symbol") {
1036+
obj.ExceptionSpecific = [{ key: "cause", value: error.cause.toString() }];
1037+
}
10321038
if (typeof error.cause === "function") {
10331039
obj.ExceptionSpecific = [{ key: "cause", value: Object.prototype.toString.call(error.cause) }];
10341040
}
@@ -1038,7 +1044,11 @@
10381044
for (const [key, value] of Object.entries(error.cause)) {
10391045
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") {
10401046
objEntries.push({ key: key, value: value });
1041-
} else {
1047+
}
1048+
if (typeof value === "bigint") {
1049+
objEntries.push({ key: key, value: "BigInt(\"" + parseInt(value) + "\")" });
1050+
}
1051+
if (typeof value === "symbol") {
10421052
objEntries.push({ key: key, value: value.toString() });
10431053
}
10441054
}

0 commit comments

Comments
 (0)