Use a switch expression in getServerChangeException()