From 2256d35be23c8762db6490763699307aecd6a615 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Tue, 30 Dec 2014 22:06:34 +0100 Subject: [PATCH] Improvement: add an error code when the renderer(blender) is not found on the server side --- protocol.txt | 1 + src/com/sheepit/client/Error.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/protocol.txt b/protocol.txt index 66e2743..c71e77b 100644 --- a/protocol.txt +++ b/protocol.txt @@ -85,6 +85,7 @@ where X: * 201 => The client does not have rendering right. * 202 => Client's session is dead. Client should do a config request before requesting a new job. * 203 => Client's session have been disabled (usually because the client is sending broken frame). The client warms the end user and logout. + * 205 => No renderer is available for Client's hardware (pair of OS and architecture). For example Blender is not avaible for MacOS 32bits. * something else => unknown error Answer with no error: diff --git a/src/com/sheepit/client/Error.java b/src/com/sheepit/client/Error.java index 26700c1..457f5c3 100644 --- a/src/com/sheepit/client/Error.java +++ b/src/com/sheepit/client/Error.java @@ -26,6 +26,7 @@ public class Error { AUTHENTICATION_FAILED, TOO_OLD_CLIENT, SESSION_DISABLED, + RENDERER_NOT_AVAILABLE, MISSING_RENDER, MISSING_SCENE, NOOUTPUTFILE, @@ -55,6 +56,7 @@ public class Error { JOB_REQUEST_ERROR_DEAD_SESSION(202), JOB_REQUEST_ERROR_SESSION_DISABLED(203), JOB_REQUEST_ERROR_INTERNAL_ERROR(204), + JOB_REQUEST_ERROR_RENDERER_NOT_AVAILABLE(205), JOB_VALIDATION_ERROR_MISSING_PARAMETER(300), JOB_VALIDATION_ERROR_BROKEN_MACHINE(301), // in GPU the generated frame is black @@ -108,6 +110,9 @@ public class Error { case JOB_VALIDATION_ERROR_SESSION_DISABLED: return Type.SESSION_DISABLED; + case JOB_REQUEST_ERROR_RENDERER_NOT_AVAILABLE: + return Type.RENDERER_NOT_AVAILABLE; + default: return Type.UNKNOWN; } @@ -129,6 +134,8 @@ public class Error { return "The renderer stopped because either you asked to stop or the server did (usually for a render time too high)."; case SESSION_DISABLED: return "The server has disabled your session. Your client may have generated a broken frame (GPU not compatible, not enough RAM/VRAM, etc)."; + case RENDERER_NOT_AVAILABLE: + return "No renderer are available on the server for your machine."; case OS_NOT_SUPPORTED: return "Operating System not supported."; case CPU_NOT_SUPPORTED: