Added exception factory.