Require not null message for IllegalCommandArgumentException

This commit is contained in:
Him188 2020-11-16 15:56:53 +08:00
parent 0e88990b13
commit 32eb098f78
2 changed files with 8 additions and 12 deletions

View File

@ -23,9 +23,7 @@ import net.mamoe.mirai.console.command.descriptor.CommandArgumentParserException
*
* @see CommandArgumentParserException
*/
public open class IllegalCommandArgumentException : IllegalArgumentException {
public constructor() : super()
public constructor(message: String?) : super(message)
public constructor(message: String?, cause: Throwable?) : super(message, cause)
public constructor(cause: Throwable?) : super(cause)
}
public open class IllegalCommandArgumentException @JvmOverloads constructor(
message: String,
cause: Throwable? = null,
) : IllegalArgumentException(message, cause)

View File

@ -58,9 +58,7 @@ public open class CommandDeclarationException : RuntimeException {
* @see CommandValueArgumentParser
* @see AbstractCommandValueArgumentParser.illegalArgument
*/
public class CommandArgumentParserException : IllegalCommandArgumentException {
public constructor() : super()
public constructor(message: String?) : super(message)
public constructor(message: String?, cause: Throwable?) : super(message, cause)
public constructor(cause: Throwable?) : super(cause)
}
public class CommandArgumentParserException @JvmOverloads constructor(
message: String,
cause: Throwable? = null,
) : IllegalCommandArgumentException(message, cause)