Add expected exception to the documentation