1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 07:02:54 +08:00

Standardise exception naming

This commit is contained in:
Dean Herbert 2020-12-09 12:07:19 +09:00
parent 2046cbe2d9
commit fd4fa963ac
3 changed files with 7 additions and 7 deletions

View File

@ -5,10 +5,10 @@ using System;
namespace osu.Game.Online.RealtimeMultiplayer namespace osu.Game.Online.RealtimeMultiplayer
{ {
public class UserAlreadyInMultiplayerRoom : Exception public class AlreadyInRoomException : Exception
{ {
public UserAlreadyInMultiplayerRoom() public AlreadyInRoomException()
: base("This user is already in a room.") : base("This user is already in a multiplayer room.")
{ {
} }
} }

View File

@ -11,7 +11,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
/// Request to join a multiplayer room. /// Request to join a multiplayer room.
/// </summary> /// </summary>
/// <param name="roomId">The databased room ID.</param> /// <param name="roomId">The databased room ID.</param>
/// <exception cref="UserAlreadyInMultiplayerRoom">If the user is already in the requested (or another) room.</exception> /// <exception cref="AlreadyInRoomException">If the user is already in the requested (or another) room.</exception>
Task<MultiplayerRoom> JoinRoom(long roomId); Task<MultiplayerRoom> JoinRoom(long roomId);
/// <summary> /// <summary>
@ -40,7 +40,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
/// Change the local user state in the currently joined room. /// Change the local user state in the currently joined room.
/// </summary> /// </summary>
/// <param name="newState">The proposed new state.</param> /// <param name="newState">The proposed new state.</param>
/// <exception cref="InvalidStateChange">If the state change requested is not valid, given the previous state or room state.</exception> /// <exception cref="InvalidStateChangeException">If the state change requested is not valid, given the previous state or room state.</exception>
/// <exception cref="NotJoinedRoomException">If the user is not in a room.</exception> /// <exception cref="NotJoinedRoomException">If the user is not in a room.</exception>
Task ChangeState(MultiplayerUserState newState); Task ChangeState(MultiplayerUserState newState);

View File

@ -5,9 +5,9 @@ using System;
namespace osu.Game.Online.RealtimeMultiplayer namespace osu.Game.Online.RealtimeMultiplayer
{ {
public class InvalidStateChange : Exception public class InvalidStateChangeException : Exception
{ {
public InvalidStateChange(MultiplayerUserState oldState, MultiplayerUserState newState) public InvalidStateChangeException(MultiplayerUserState oldState, MultiplayerUserState newState)
: base($"Cannot change from {oldState} to {newState}") : base($"Cannot change from {oldState} to {newState}")
{ {
} }