Skip to content

Add error reason to /tex for invalid LaTeX #206

@Zabuzard

Description

@Zabuzard

Right now, when using an invalid LaTeX with /tex, it just says that its invalid. But does not give any further reason. The reason is available with the exception in the code though and should be exposed to the user.

Simply change TeXCommand#onSlashCommand to:

} catch (ParseException e) {
    event.reply("That is an invalid latex. Reason: " + e.getMessage())
        .setEphemeral(true)
        .queue();
    return;
}

adding the Reason: " + e.getMessage().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhance commandModify or improve an existing command or group of commands of the botpriority: normal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions