A Posteriori Error Analysis Via Duality Theory