Package org.javacord.core.util.exception
Interface DiscordExceptionInstantiator<T extends DiscordException>
-
- Type Parameters:
T
- The type of the discord exception that is produced.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DiscordExceptionInstantiator<T extends DiscordException>
Represents a function that accepts four arguments (Exception
,String
,RestRequest<?>
andRestRequestResult
) and produces a discord exception of typeT
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
createInstance(Exception origin, String message, RestRequestInformation request, RestRequestResponseInformation response)
Creates a new instance of the classT
.
-
-
-
Method Detail
-
createInstance
T createInstance(Exception origin, String message, RestRequestInformation request, RestRequestResponseInformation response)
Creates a new instance of the classT
.- Parameters:
origin
- The origin of the exception.message
- The message of the exception.request
- The information about the request.response
- The information about the response.- Returns:
- The new instance.
-
-