Sitemap
Samayun Miah Chowdhury

Samayun Miah Chowdhury

Fan of JavaScript & Python lover Feels good to introduced as a realtime web application developer sunglasses PWA is my crushwink I do 2 times teeth brush

Most productive exception handling ever on Node.js

Redirect to StackOverflow when get exceptions to find solution of error messages

--

const url = `http://stackoverflow.com/search?q=[js]'${error.message}'`;require(‘child_process’).exec(`firefox ${url}`)
Press enter or click to view image in full size
Most productive exception handling ever on Node.js
// Most productive exception handling ever on Node.jsconst url = `http://stackoverflow.com/search?q=[js]'${error.message}'`;
// firefox on linux
require('child_process').exec(`firefox ${url}`);
// chrome on linux
require('child_process').exec(`google-chrome --no-sandbox ${url}`);
// chrome on MacOSX
require('child_process').exec(`open -a "Google Chrome" ${url}`);
// microsoft-edge on Windows
require('child_process').exec(`start microsoft-edge:${url}`);

--

--

Samayun Miah Chowdhury
Samayun Miah Chowdhury

Written by Samayun Miah Chowdhury

Fan of JavaScript & Python lover Feels good to introduced as a realtime web application developer sunglasses PWA is my crushwink I do 2 times teeth brush