Refactoring logic exception to not have so many different constructors.