Moved to an exception based solution.