Suppress error message at shutdown
See original GitHub issueEvery time I close my node.js server with rclnodejs running I get this error message:
.../my-project/node_modules/rclnodejs/index.js:300
throw new Error('The module rclnodejs has been shutdown.');
^
Error: The module rclnodejs has been shutdown.
at Object.shutdown (.../my-project/node_modules/rclnodejs/index.js:300:13)
at process.<anonymous> (.../my-project/node_modules/rclnodejs/index.js:412:7)
at process.emit (events.js:314:20)
It originates from here: https://github.com/RobotWebTools/rclnodejs/blob/178c2c7068e9c1961f0db3328ab74a366803340e/index.js#L410-L414
I don’t quite get why it is raised in the first place, but anyhow, wouldn’t it be better if there was a rclnodejs.tryShutdown()
method that would be called in that event instead? It would be much like the existing Context.tryShutdown()
: Don’t do anything if the (default) context is already shut down and else shut it down now.
Is such a change welcome? If yes, I can offer to implement it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Error Message When Shutting Down
Select System Configuration then click Services tab. Put a check on the box that say Hide all Microsoft services. Click Apply then OK....
Read more >Disable the Shutdown & Logoff Status Messages On Your ...
Go to the Location Administrative Templates> System> Remove Boot/ Shutdown/ Logon/ Logoff status messages and select disable to enable shutdown and logoff ...
Read more >How to Disable Error Reporting in Windows
Disable Error Reporting in Windows XP · Go to Start and then Control Panel. · Select Performance and Maintenance. · Select System under...
Read more >How to disable has stopped working message in windows
Disable the Error Dialog Through Registry Editor · 1. Type regedit into a new run command (windows key + r) and select OK...
Read more >Ubuntu 20.04 - How to hide error messages at shutdown
My Ubuntu 20.04 displays some error messages at shutdown almost every time. I want to hide error messages even if there are errors....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The reason why you got the error is that you terminated the process before the
Promise
return byrclnodejs.regenerateAll()
is resolved, so the rclnodejs module hasn’t been started practically. Normally, generating all the messages triggered byregenerateAll()
method takes more around 20s, so you could wait for a while and then pressctrl+c
to check if the error is still reported.+1, I think it’s more user friendly, please go-ahead to submit the PR, thanks!