* add ErrorClass argument to createErro function.