Skip to content

Commit

Permalink
Merge branch 'release/v0.25.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Oct 17, 2024
2 parents 67b9ea1 + 0fabe5f commit 73f362d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zeed",
"type": "module",
"version": "0.25.1",
"version": "0.25.2",
"description": "🌱 Simple foundation library",
"author": {
"name": "Dirk Holtwick",
Expand Down
3 changes: 3 additions & 0 deletions src/common/data/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ export function formatMessages(
if (obj && typeof obj === 'object') {
if (pretty && (obj instanceof Uint8Array || obj instanceof ArrayBuffer))
return `\n${Uint8ArrayToHexDump(obj)}\n`
if (typeof ErrorEvent !== 'undefined' && obj instanceof ErrorEvent) {
obj = obj.error
}
if (obj instanceof Error) {
if (!trace)
return `${obj.name || 'Error'}: ${obj.message}`
Expand Down
2 changes: 1 addition & 1 deletion src/common/log/log-memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function LoggerMemoryHandler(
const m = objectPlain(msg, {
maxDepth,
errorTrace,
keepAsIs: v => v instanceof Error,
keepAsIs: v => (v instanceof Error) || (typeof ErrorEvent !== 'undefined' && v instanceof ErrorEvent),
})

if (compact === true)
Expand Down
3 changes: 1 addition & 2 deletions src/common/msg/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ export function useMessageHub(
await postMessage({ id, result })
}
catch (error) {
const err
= error instanceof Error ? error : new Error(valueToString(error))
const err = error instanceof Error ? error : new Error(valueToString(error))
log.warn('execution error', err.name)
await postMessage({
id,
Expand Down

0 comments on commit 73f362d

Please sign in to comment.