Use #ifdef in Service interface instead of throwing exception