Set error at exit to the value of the first fatal error.