Search in sources :

Example 1 with StringBuilderPrintWriter

use of net.anweisen.utilities.common.collection.StringBuilderPrintWriter in project Utility by anweisen.

the class SlashCommandHelper method execute.

public void execute() {
    // pretty ugly code
    sortSlashCommands();
    StringBuilderPrintWriter writer = new StringBuilderPrintWriter();
    dump(writer);
    String dump = writer.toString();
    try {
        convertSlashCommands();
    } catch (WrappedException ex) {
        CommandManager.LOGGER.error("Failed to register command hierarchy" + dump);
        throw ex;
    }
    registerSlashCommands();
}
Also used : WrappedException(net.anweisen.utilities.common.collection.WrappedException) StringBuilderPrintWriter(net.anweisen.utilities.common.collection.StringBuilderPrintWriter)

Aggregations

StringBuilderPrintWriter (net.anweisen.utilities.common.collection.StringBuilderPrintWriter)1 WrappedException (net.anweisen.utilities.common.collection.WrappedException)1