there he was held as prisoner of the french during the napoleonic wars