raise proper error when failing to define a platform properly