2
3import java.util.UUID;
4
5public class PlayerDatabaseExceptionWrapper extends RuntimeException { 6 public PlayerDatabaseExceptionWrapper(final String message, final UUID uniqueId, 7 final Throwable e) { 8 super(message + ": " + uniqueId.toString(), e); 9 }10}
1package io.tofpu.speedbridge2.model.island.exception;
2
3public class IslandDatabaseExceptionWrapper extends RuntimeException {4 public IslandDatabaseExceptionWrapper(final String message, final int slot,5 final Throwable e) {6 super(message + (slot == -1 ? "" : ": " + slot), e);7 }8}
This class is an exception, but its name does not end in Exception
. This could be confusing to consumers of your API.
class BadName extends Exception {
// ...
}
class ActuallyAnException extends Exception {
// ...
}