From 9b81573eb7ffc74c0fee84266356b0b2f9d6410e Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 25 Jun 2023 17:36:46 +0200 Subject: [PATCH] Client - Added or improved `Throws` documentation on many methods --- source/birchwood/client/client.d | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/source/birchwood/client/client.d b/source/birchwood/client/client.d index 9921431..9948794 100644 --- a/source/birchwood/client/client.d +++ b/source/birchwood/client/client.d @@ -209,7 +209,7 @@ public class Client : Thread * Params: * nickname = the nickname to request * Throws: - * BirchwoodException on invalid nickname + * `BirchwoodException` on invalid nickname */ public void nick(string nickname) { @@ -244,7 +244,7 @@ public class Client : Thread * Params: * channel = the channel to join * Throws: - * BirchwoodException on invalid channel name + * `BirchwoodException` on invalid channel name */ public void joinChannel(string channel) { @@ -275,7 +275,8 @@ public class Client : Thread * Params: * channels = the channels to join * Throws: - * BirchwoodException on invalid channel name + * `BirchwoodException` on invalid channel name or + * if the list is empty */ public void joinChannel(string[] channels) { @@ -344,7 +345,8 @@ public class Client : Thread * Params: * channels = the list of channels to part from * Throws: - * BirchwoodException if the channels list is empty + * `BirchwoodException` if the channels list is empty + * or there are illegal characters present */ public void leaveChannel(string[] channels) { @@ -431,7 +433,8 @@ public class Client : Thread * message = The message to send * recipients = The receipients of the message * Throws: - * BirchwoodException if the recipients list is empty + * `BirchwoodException` if the recipients list is empty + * or illegal characters are present */ public void directMessage(string message, string[] recipients) { @@ -504,6 +507,9 @@ public class Client : Thread * Params: * message = The message to send * recipients = The receipient of the message + * Throws: + * `BirchwoodException` if the receipient's nickname + * is invalid or there are illegal characters present */ public void directMessage(string message, string recipient) { @@ -537,7 +543,7 @@ public class Client : Thread * message = The message to send * recipients = The receipients of the message * Throws: - * BirchwoodException if the channels list is empty + * `BirchwoodException` if the channels list is empty */ public void channelMessage(string message, string[] channels) { @@ -610,6 +616,9 @@ public class Client : Thread * Params: * message = The message to send * channel = The channel to send the message to + * Throws: + * `BirchwoodException` if the message or channel name + * contains illegal characters */ public void channelMessage(string message, string channel) { @@ -892,11 +901,11 @@ public class Client : Thread * Sends a message to the server by enqueuing it on * the client-side send queue. * - * A BirchwoodException is thrown if the messages - * final length exceeds 512 bytes - * * Params: * message = the message to send + * Throws: + * `BirchwoodException` if the message's length + * exceeds 512 bytes */ private void sendMessage(Message message) {