add error handler header file and generated source code