Add online (aka ReplayCenter) module
Add localization extra (formally known as LocalizedResourcePack) Add version checker extra
This commit is contained in:
28
src/main/java/com/replaymod/online/api/ApiException.java
Executable file
28
src/main/java/com/replaymod/online/api/ApiException.java
Executable file
@@ -0,0 +1,28 @@
|
||||
package com.replaymod.online.api;
|
||||
|
||||
import com.replaymod.online.api.replay.holders.ApiError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ApiException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 349073390504232810L;
|
||||
|
||||
private ApiError error;
|
||||
|
||||
public ApiException(ApiError error) {
|
||||
super(error.getTranslatedDesc());
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public ApiException(String error) {
|
||||
super(error);
|
||||
}
|
||||
|
||||
public ApiError getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user