Added error handling to new FdElectrostatics class.