mirror of https://github.com/OpenRCT2/OpenRCT2.git
Improve messages for default case in switch stmt
This commit is contained in:
parent
a1517a4fcb
commit
f49fe68cc6
|
@ -90,7 +90,7 @@ GameActions::Result BannerSetStyleAction::Query() const
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid type: %u", _type);
|
||||
LOG_ERROR("Invalid banner style type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
return res;
|
||||
|
@ -147,7 +147,7 @@ GameActions::Result BannerSetStyleAction::Execute() const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("Invalid type: %u", _type);
|
||||
LOG_ERROR("Invalid banner style type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ GameActions::Result CheatSetAction::Execute() const
|
|||
break;
|
||||
default:
|
||||
{
|
||||
LOG_ERROR("Unabled cheat: %d", _cheatType.id);
|
||||
LOG_ERROR("Invalid cheat type %d", _cheatType.id);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY&
|
|||
return res;
|
||||
|
||||
default:
|
||||
LOG_ERROR("Tried calling buy land rights with an incorrect setting %u", _setting);
|
||||
LOG_ERROR("Invalid land buying setting %u", _setting);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ GameActions::Result LandSetRightsAction::MapBuyLandRightsForTile(const CoordsXY&
|
|||
return res;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("Tried calling set land rights with an incorrect setting %u", _setting);
|
||||
LOG_ERROR("Invalid setting %u to set land rights", _setting);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("Invalid map selection %u", _selectionType);
|
||||
LOG_ERROR("Invalid map selection type %u", _selectionType);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, std::get<StringId>(res.ErrorTitle), STR_NONE);
|
||||
} // switch selectionType
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ GameActions::Result PeepPickupAction::Query() const
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid pickup type: %u", _type);
|
||||
LOG_ERROR("Invalid peep pickup type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE);
|
||||
}
|
||||
return res;
|
||||
|
@ -175,7 +175,7 @@ GameActions::Result PeepPickupAction::Execute() const
|
|||
CancelConcurrentPickups(peep);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid pickup type: %u", _type);
|
||||
LOG_ERROR("Invalid peep pickup type %u", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE);
|
||||
}
|
||||
return res;
|
||||
|
|
|
@ -147,7 +147,7 @@ GameActions::Result RideSetSettingAction::Query() const
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Invalid RideSetSetting: %u", static_cast<uint8_t>(_setting));
|
||||
LOG_ERROR("Invalid ride setting %u", static_cast<uint8_t>(_setting));
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ GameActions::Result RideSetStatusAction::Execute() const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
Guard::Assert(false, "Invalid status passed: %u", _status);
|
||||
Guard::Assert(false, "Invalid ride status %u", _status);
|
||||
break;
|
||||
}
|
||||
auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager();
|
||||
|
|
|
@ -118,7 +118,7 @@ GameActions::Result RideSetVehicleAction::Query() const
|
|||
}
|
||||
|
||||
default:
|
||||
LOG_ERROR("Unknown vehicle command. type = %d", _type);
|
||||
LOG_ERROR("Invalid ride vehicle setting %d", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ GameActions::Result RideSetVehicleAction::Execute() const
|
|||
}
|
||||
|
||||
default:
|
||||
LOG_ERROR("Unknown vehicle command. type = %d", _type);
|
||||
LOG_ERROR("Invalid ride vehicle setting %d", _type);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ GameActions::Result ScenarioSetSettingAction::Execute() const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("Invalid setting: %u", _setting);
|
||||
LOG_ERROR("Invalid scenario setting %u", _setting);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const
|
|||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("invalid instruction");
|
||||
LOG_ERROR("Invalid tile modification type %u", _setting);
|
||||
return GameActions::Result(
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue