refactoring runtime errors message