write a Function of process in errorHandling.js
refine a Function of process in errorHandling.js