move errHanler to exception-factory.js