Annotation Interface Error


A CommandDoc Annotation that describes a possible error or termination clause a Command might have during it's runtime.

These are formatted ways to describe errors and provide the response() method for specifying the bot's response if the error occurs.

Multiples of these can be applied using the @Errors annotation, or simply multiples of these can be attached to a class or method.

Below is a visual of what this should generally look like:

     Possible Errors:
     • "I encountered an issue while processing this command!" - Houston had a problem!
     • "You used this command too fast" - b1nzy's fault!
     • "An unexpected error occurred!" - Let's just blame Onitor!
 
Since:
2.0
Author:
Kaidan Gustave
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The DocConverter for the @Error annotation.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    A brief description of what caused the error.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A prefix appended to the front of the produced String during conversion.
    A response message that would normally be sent if this error occurs, as a means of users identifying the error without an idea of what exactly went wrong.
  • Element Details

    • value

      String value
      A brief description of what caused the error.
      Returns:
      A description of what caused the error.
    • response

      String response
      A response message that would normally be sent if this error occurs, as a means of users identifying the error without an idea of what exactly went wrong.
      Returns:
      A response message.
      Default:
      ""
    • prefix

      String prefix
      A prefix appended to the front of the produced String during conversion.
      Only really useful or needed when a Command has multiple @Error annotations, for the purpose of listing.
      Returns:
      A prefix for the conversion, useful when multiple @Errors are specified.
      Default:
      ""