When an error is sent, also send its type
This commit is contained in:
@@ -21,27 +21,38 @@ package com.sheepit.client;
|
||||
|
||||
public class Error {
|
||||
public enum Type {
|
||||
OK,
|
||||
WRONG_CONFIGURATION,
|
||||
AUTHENTICATION_FAILED,
|
||||
TOO_OLD_CLIENT,
|
||||
SESSION_DISABLED,
|
||||
RENDERER_NOT_AVAILABLE,
|
||||
MISSING_RENDER,
|
||||
MISSING_SCENE,
|
||||
NOOUTPUTFILE,
|
||||
DOWNLOAD_FILE,
|
||||
CAN_NOT_CREATE_DIRECTORY,
|
||||
NETWORK_ISSUE,
|
||||
RENDERER_CRASHED,
|
||||
RENDERER_OUT_OF_VIDEO_MEMORY,
|
||||
RENDERER_KILLED,
|
||||
RENDERER_MISSING_LIBRARIES,
|
||||
FAILED_TO_EXECUTE,
|
||||
OS_NOT_SUPPORTED,
|
||||
CPU_NOT_SUPPORTED,
|
||||
GPU_NOT_SUPPORTED,
|
||||
UNKNOWN
|
||||
// id have to be kept synchronised with the server side.
|
||||
OK(0),
|
||||
UNKNOWN(99),
|
||||
WRONG_CONFIGURATION(1),
|
||||
AUTHENTICATION_FAILED(2),
|
||||
TOO_OLD_CLIENT(3),
|
||||
SESSION_DISABLED(4),
|
||||
RENDERER_NOT_AVAILABLE(5),
|
||||
MISSING_RENDER(6),
|
||||
MISSING_SCENE(7),
|
||||
NOOUTPUTFILE(8),
|
||||
DOWNLOAD_FILE(9),
|
||||
CAN_NOT_CREATE_DIRECTORY(10),
|
||||
NETWORK_ISSUE(11),
|
||||
RENDERER_CRASHED(12),
|
||||
RENDERER_OUT_OF_VIDEO_MEMORY(13),
|
||||
RENDERER_KILLED(14),
|
||||
RENDERER_MISSING_LIBRARIES(15),
|
||||
FAILED_TO_EXECUTE(16),
|
||||
OS_NOT_SUPPORTED(17),
|
||||
CPU_NOT_SUPPORTED(18),
|
||||
GPU_NOT_SUPPORTED(19);
|
||||
|
||||
private final int id;
|
||||
|
||||
private Type(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ServerCode {
|
||||
|
||||
Reference in New Issue
Block a user