Removed enum class

Enum throw replaced with Exception class