mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 19:36:41 +00:00
Improve exceptions (#1256)
- Kick more exceptions further up the pipeline to be more likely to be shown to player - Try to avoid lots of console spamming when it's the same error multiple times - Allow parsing of FaweExceptions during commands to better give information to players
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.internal.command.exception;
|
||||
|
||||
import com.fastasyncworldedit.core.configuration.Caption;
|
||||
import com.fastasyncworldedit.core.internal.exception.FaweException;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.sk89q.worldedit.DisallowedItemException;
|
||||
import com.sk89q.worldedit.EmptyClipboardException;
|
||||
@ -197,4 +198,11 @@ public class WorldEditExceptionConverter extends ExceptionConverterHelper {
|
||||
throw e;
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
@ExceptionMatch
|
||||
public void convert(FaweException e) throws CommandException {
|
||||
throw newCommandException(e.getComponent(), e);
|
||||
}
|
||||
//FAWE end
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user