Skip to content

Commit

Permalink
output error to console
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxulai committed May 19, 2024
1 parent c6e7786 commit 4ab7838
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function component<P = unknown>(comp: AirxComponent<P>): AirxComponent<P>

export function createErrorRender(error: unknown): AirxComponentRender {
const formattingError = (): string => {
console.error(error)
if (error == null) return 'Unknown rendering error'
if (error instanceof Error) return error.message
return JSON.stringify(error)
Expand Down

0 comments on commit 4ab7838

Please sign in to comment.