Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process 'uncaughtException' event is not triggered #5219

Closed
ArtemGovorov opened this issue Sep 13, 2023 · 2 comments
Closed

process 'uncaughtException' event is not triggered #5219

ArtemGovorov opened this issue Sep 13, 2023 · 2 comments
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@ArtemGovorov
Copy link

What version of Bun is running?

1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b

What platform is your computer?

Darwin 21.6.0 x86_64 i386

What steps can reproduce the bug?

test.js

process.on('uncaughtException', () => {
    console.log('Caught')
});

throw new Error('boom')

node

$ node test.js
Caught

bun

$ bun run test.js
1 |   console.log("Caught");
2 | });
3 | 
4 | throw new Error("boom");
         ^
error: boom
      at ./test.js:63:6

What is the expected behavior?

process 'uncaughtException' event is raised and handled

What do you see instead?

No response

Additional information

No response

@ArtemGovorov ArtemGovorov added the bug Something isn't working label Sep 13, 2023
@ArtemGovorov
Copy link
Author

ArtemGovorov commented Sep 13, 2023

The same happens to process unhandledRejection event:

process.on('unhandledRejection', () => {
    console.log('Caught')
});
new Promise((y,n) => {
    n(new Error('boom'));
})

@Electroid
Copy link
Contributor

Duplicate of #429

@Electroid Electroid marked this as a duplicate of #429 Oct 27, 2023
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
@Electroid Electroid added the node.js Compatibility with Node.js APIs label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

2 participants