Optimization error message for abstract classes