mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Standardise exception naming
This commit is contained in:
parent
2046cbe2d9
commit
fd4fa963ac
@ -5,10 +5,10 @@ using System;
|
||||
|
||||
namespace osu.Game.Online.RealtimeMultiplayer
|
||||
{
|
||||
public class UserAlreadyInMultiplayerRoom : Exception
|
||||
public class AlreadyInRoomException : Exception
|
||||
{
|
||||
public UserAlreadyInMultiplayerRoom()
|
||||
: base("This user is already in a room.")
|
||||
public AlreadyInRoomException()
|
||||
: base("This user is already in a multiplayer room.")
|
||||
{
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
/// Request to join a multiplayer room.
|
||||
/// </summary>
|
||||
/// <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);
|
||||
|
||||
/// <summary>
|
||||
@ -40,7 +40,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
/// Change the local user state in the currently joined room.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
Task ChangeState(MultiplayerUserState newState);
|
||||
|
||||
|
@ -5,9 +5,9 @@ using System;
|
||||
|
||||
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}")
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user