Попробуйте добавить пункт о случае пропущенной константы, или добавить пункт по умолчанию.
// you can just use a default value, or you can add the other values inside the enum:
switch(value) {
case Enum1: // ....
default:
// do something here to avoid the error
}
loonix