refactored comments and some internal variables.
added isDomainError checker and added class level comments.º
integration of isDomainError condition to switch between Exception
classes.