forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't convert error to string (vercel#36804)
Stack trace disappears when error is converted to string. I changed the types in `log.ts` to match `console.log`/`console.error`/`console.warn`. fixes vercel#31591
- Loading branch information
1 parent
6f344e6
commit 2e13534
Showing
7 changed files
with
95 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default function Page() { | ||
return <p>getServerSideProps page</p> | ||
} | ||
|
||
export async function getServerSideProps() { | ||
setTimeout(() => { | ||
throw new Error() | ||
}, 10) | ||
return { | ||
props: {}, | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default function Page() { | ||
return <p>getServerSideProps page</p> | ||
} | ||
|
||
export async function getServerSideProps() { | ||
setTimeout(() => { | ||
Promise.reject(new Error()) | ||
}, 10) | ||
return { | ||
props: {}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters