added exception into doctstring