Use getError and remove the error_code operator.