Framework error handling imporoved