When an error is sent, also send its type
This commit is contained in:
@@ -400,9 +400,9 @@ public class Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
writer.close();
|
writer.close();
|
||||||
String args = "";
|
String args = "?type=" + (error == null ? "" : error.getValue());
|
||||||
if (job_to_reset_ != null) {
|
if (job_to_reset_ != null) {
|
||||||
args = "?frame=" + job_to_reset_.getFrameNumber() + "&job=" + job_to_reset_.getId() + "&render_time=" + job_to_reset_.getRenderDuration();
|
args += "&frame=" + job_to_reset_.getFrameNumber() + "&job=" + job_to_reset_.getId() + "&render_time=" + job_to_reset_.getRenderDuration();
|
||||||
if (job_to_reset_.getExtras() != null && job_to_reset_.getExtras().isEmpty() == false) {
|
if (job_to_reset_.getExtras() != null && job_to_reset_.getExtras().isEmpty() == false) {
|
||||||
args += "&extras=" + job_to_reset_.getExtras();
|
args += "&extras=" + job_to_reset_.getExtras();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,27 +21,38 @@ package com.sheepit.client;
|
|||||||
|
|
||||||
public class Error {
|
public class Error {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
OK,
|
// id have to be kept synchronised with the server side.
|
||||||
WRONG_CONFIGURATION,
|
OK(0),
|
||||||
AUTHENTICATION_FAILED,
|
UNKNOWN(99),
|
||||||
TOO_OLD_CLIENT,
|
WRONG_CONFIGURATION(1),
|
||||||
SESSION_DISABLED,
|
AUTHENTICATION_FAILED(2),
|
||||||
RENDERER_NOT_AVAILABLE,
|
TOO_OLD_CLIENT(3),
|
||||||
MISSING_RENDER,
|
SESSION_DISABLED(4),
|
||||||
MISSING_SCENE,
|
RENDERER_NOT_AVAILABLE(5),
|
||||||
NOOUTPUTFILE,
|
MISSING_RENDER(6),
|
||||||
DOWNLOAD_FILE,
|
MISSING_SCENE(7),
|
||||||
CAN_NOT_CREATE_DIRECTORY,
|
NOOUTPUTFILE(8),
|
||||||
NETWORK_ISSUE,
|
DOWNLOAD_FILE(9),
|
||||||
RENDERER_CRASHED,
|
CAN_NOT_CREATE_DIRECTORY(10),
|
||||||
RENDERER_OUT_OF_VIDEO_MEMORY,
|
NETWORK_ISSUE(11),
|
||||||
RENDERER_KILLED,
|
RENDERER_CRASHED(12),
|
||||||
RENDERER_MISSING_LIBRARIES,
|
RENDERER_OUT_OF_VIDEO_MEMORY(13),
|
||||||
FAILED_TO_EXECUTE,
|
RENDERER_KILLED(14),
|
||||||
OS_NOT_SUPPORTED,
|
RENDERER_MISSING_LIBRARIES(15),
|
||||||
CPU_NOT_SUPPORTED,
|
FAILED_TO_EXECUTE(16),
|
||||||
GPU_NOT_SUPPORTED,
|
OS_NOT_SUPPORTED(17),
|
||||||
UNKNOWN
|
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 {
|
public enum ServerCode {
|
||||||
|
|||||||
Reference in New Issue
Block a user