When using the Harlequin Direct API, each function can return a subset of the following codes, but will always return 0 for successful operation.


Return code suffix


0SuccessThe command was successful.
1InvalidArgumentOne or more of the given arguments was invalid (for example, empty/null.)
2UnknownErrorAn unknown error occurred.
3CPlusPlusExceptionA C++ exception was thrown.
4UnrecognizedCommandThe given command was not recognized.
5NoActivePrintRunThe command given could not execute, as no print run is active.
6PrintRunActiveThe command given could not execute, as a print run is active.
7FailedToLoadConfigFileThe given config file could not be opened.
8JobFileNotFoundThe given file argument was not found at the specified path.

The given config file was invalid.

This includes bad JSON syntax, wrongly typed fields, invalid directories specified within the config, or bad combinations of values (for example, enabling both Continuous and Mixed mode). 

10InvalidPasswordThe password was invalid for the given licence.

The licence string or licence settings were invalid (for example. the RIP-count setting is too high for the specified licence).

12LicenceAlreadySetCould not set the licence because a licence was already set.
13NoConnectionThe command could not be sent as there was no socket connection.
14PluginFailedToLoadFailed to load a plugin; it may not exist at the specified path.
15PrintRunBusyThe action could not be executed, as the active print run was still processing one or more jobs.
16InstanceNotFoundThe specified Harlequin Direct instance was not found.
17ApiAlreadyShutDownThe API was already shut down when trying to issue a shutdown.
18ApiAlreadyActiveThe API was already active when trying to activate it.
19InvalidSocketInterfaceOperationThe socket interface operation failed.
20SocketInterfaceAlreadyStartedThe socket interface was already started when trying to start it.
21InvalidJobIDThe given job ID does not point to an existing job.
22BadClripDirectoryThe specified scalable RIP directory was not a directory.
23BadOutputDirectoryThe specified output directory for the scalable RIP was either unspecified or not a directory.
24ScalableRipNotFoundThe scalable RIP was not found in the specified directory.
25ZeroNumberOfRipsThe number of RIPs specified for the scalable RIP was zero.
26BadSpdDirectoryThe specified ScreenPro Direct directory was not a directory.
27ScreenProDirectNotFoundScreenPro Direct was not found in the specified directory.
28SPDConfigFileNotFoundThe specified ScreenPro Direct config file was not found.
29DuplicateScreenProDirectInstanceA ScreenPro Direct instance already exists with the given ID.
30InvalidScreenProDirectOperationThe issued command cannot be executed in ScreenPro Direct's current state (for example, attempted to start when already active).
31ScreenProDirectOperationFailedA ScreenPro Direct command was issued, and it returned with a failure code.
32PipelineStatusErrorAn error occurred while fetching the pipeline status.
33InvalidSPDStatusTransitionCould not transition ScreenPro Direct to the given status.

The given plane number argument to the JobXmlSerializer was invalid.

This happens when attempting to set plane parameters of a plane that already exists, or adding a filename to a plane number that doesn't exist.

35InvalidScreenDirectoryThe given screen directory does not exist or is not empty.
36InvalidFilenameThe given file name does not exist.
37DuplicateHarlequinDirectInstanceA Harlequin Direct instance already exists with the given ID.
38FailedToRegisterHandlerAn event handler failed to register.
39HeartbeatActiveCould not execute the command because a heartbeat was already active.
40NoHeartbeatActiveNo heartbeat is active to carry out the given command.
41ResponseTimeoutThe Harlequin Direct socket timed out while expecting a response.
42ResultTimeoutThe Harlequin Direct socket timed out while expecting a result.
43FailedToSendDataData failed to send over the socket.
44ConnectionFailedFailed to establish a connection to a socket.

The given JSON file was invalid. This error code is separate from InvalidConfig in that it only concerns JSON files that are not configs (for example. JSON metadata for sprites).

The same conditions apply for bad syntax, bad value formatting, wrongly typed fields, and so on.

46InvalidOperationThe command interface has already started.
47ScalableRipFailedToStartThe scalable RIP has failed to start.
48PluginCommandFailedThe named plugin is invalid/does not exist, the command is invalid, or the result is zero.