Return Codes
DocOrigin applications report return codes, most typically in the logs. The following provides a brief explanation of each.
The return code numbers were changed so as to be compatible with Unix which restricts return codes to the range 0 to 255.
If your script or filter executable provides a return code, we request that it be in the 200 to 250 range.
FilterEditor
RC | Mnemonic | Meaning |
---|---|---|
0 | OK/SUCCESS | All is well. |
1 | ambiguous | Deliberately not used. Does it mean true/Ok or not-zero so not Ok? |
2, -101 | ERR_FILTER_ARGLIST | Data Filter argument list is invalid. |
3, -102 | ERR_FILTER_INPUTFILE | Data Filter input file cannot be opened. |
4, -103 | ERR_FILTER_OUTPUTFILE | Data Filter output file cannot be created. |
5, -104 | ERR_FILTER_FORMFILE | Data Filter form file cannot be opened. |
6, -105 | ERR_FILTER_PROCESS | Document sort has encountered issues with the XML data file. |
7, -101 | ERR_COMBINEFORMS_ARGLIST | Combine forms argument list is invalid. |
8, -904 | ERR_SCRIPT_INPUT_FILE | When parsing in JavaScript, the input file was not found. |
9, -905 | ERR_SCRIPT_OUTPUT_FILE | When parsing in JavaScript, the output file could not be written. |
10, -906 | ERR_SCRIPT_DATA_CONVERT | Error parsing a comma-delimited file. |
11, -907 | ERR_SCRIPT_FORMAT | Error parsing a fixed format data file to XML. |
SendMail
RC | Mnemonic | Meaning |
---|---|---|
21, -101 | ERR_EMAIL_ARGLIST | DocOriginSendMailServer has invalid arguments. |
22, -102 | ERR_EMAIL_SCANFOLDER | No -mailscanfolder option has been provided. |
23, -103 | ERR_EMAIL_FROM | The from address was not supplied or is invalid. |
24, -104 | ERR_EMAIL_ATTACH | An attachment file was not found. |
25, -106 | ERR_EMAIL_TO | No To address was supplied, or is invalid. |
26, -107 | ERR_EMAIL_CC | The Cc address is invalid. |
27, -108 | ERR_EMAIL_BCC | The Bcc address is invalid. |
28, -109 | ERR_EMAIL_TEXTOPEN | The @file specified for the text mail body was not found. |
29, -113 | ERR_EMAIL_SEND | cURL was unable to send the email message. |
30, -115 | ERR_EMAIL_SMTPHOST | The -smtphost option was not specified. |
31, -116 | ERR_EMAIL_HTMLOPEN | The @file specified for the HTML mail body was not found. |
32, -117 | ERR_EMAIL_EMLOPEN | Could not create the email packet file to send. |
33, -118 | ERR_EMAIL_CURLCMDOPEN | Could not create the cURL command file with which to invoke cURL. |
34 | ERR_EMAIL_ATTACH_OPEN | An attachment file could not be accessed. Check CombineDocuments. |
Merge
RC | Mnemonic | Meaning |
---|---|---|
41, -201 | ERR_MERGE_ARGLIST | Invalid or missing argument list. |
42, -202 | ERR_MERGE_NOFONTS | The configuration has no fonts defined. |
43, -203 | ERR_MERGE_CANNOTLOG | Log file undefined or not writable. |
44, -204 | ERR_MERGE_NOCONFIG | Missing or invalid Configuration file. |
45, -205 | ERR_MERGE_NOFORMFILE | No form file specified. |
46, -206 | ERR_MERGE_NODATAFILE | No data file specified. |
47, -207 | ERR_MERGE_LOADSCRIPT | Error loading the -scriptFile script. |
48, -208 | ERR_MERGE_FILTER | A filter provided a non-zero return code. |
49, -209 | ERR_MERGE_FORMLOAD | Could not load the form file. |
50, -210 | ERR_MERGE_WORDWRAPFORM | Could not word wrap the text in a document. |
51, -211 | ERR_MERGE_PROCESSSCRIPT | Error processing any Merge event script. |
52, -212 | ERR_MERGE_DATAOPEN | Could not open the data file. |
53, -213 | ERR_MERGE_DATAPROCESS | Error while processing all the data documents. |
54, -214 | ERR_MERGE_FORMANDDATA | Error merging the data with the form design. |
55, -215 | ERR_MERGE_EMBEDDEDFIELDS | Error while embedding [fields] in the document. |
56, -216 | ERR_MERGE_WORDWRAPDOC | Error word-wrapping the document. |
57, -217 | ERR_MERGE_PAGINATE | Error paginating the document. |
58, -218 | ERR_MERGE_PRINTDOCUMENT | Error printing the document. |
59, -219 | ERR_MERGE_GLOBALS | Error while copying global values to applicable global fields. |
60, -220 | ERR_MERGE_AUTOFIELDS | Error while populating the automatic fields. |
61, -221 | ERR_MERGE_TO_TOO_LONG | unused |
62, -222 | ERR_MERGE_CC_TOO_LONG | unused |
63, -223 | ERR_MERGE_BCC_TOO_LONG | unused |
64, -224 | ERR_MERGE_ATTACH_TOO_LONG | unused |
65, -225 | ERR_MERGE_NO_OUTPUT_DATA | Name not provided for the creation of sample data. |
66, -226 | ERR_MERGE_CREATE_SAMPLE_DATA | Could not create the sample data. |
67, -227 | ERR_MERGE_MISSING_PROFILE | Could not load profile (including printer table). |
68, -228 | ERR_MERGE_PLACEHOLDERS | Failed to process placeholders. |
PDFExtract
The negative PDFExtract return codes were in use up to 3.1.001.16
RC | Mnemonic | Meaning |
---|---|---|
41, -1 | ERR_MERGE_ARGLIST | Invalid or missing argument list. |
70, -2 | ERR_INPUT_OPEN_ERR | An input PDF file could not be opened |
71, -3 | ERR_OUTPUT_OPEN_ERR | The output PDF could not be opened |
72, -4 | ERR_PDF_READ_ERR | An input PDF file could not be read |
73, -5 | ERR_DO_MISSING_ERR | The DocOrigin document index markings are missing |
74, -6 | ERR_INVALID_PAGELIST | The -page option is incorrectly specified |
75, -7 | ERR_NO_EMBEDDED_DATA | The input PDF does not have its data embedded |
76, -8 | ERR_NOT_A_DO_PDF | An input PDF is not a DocOrigin-produced PDF |
77, -9 | ERR_NO_EXTRACT_FILE | No file name provided for -extractdata |
78, -10 | ERR_ATTACH_OPEN_ERR | A file to be attached could not be opened |
FolderMonitor
RC | Mnemonic | Meaning |
---|---|---|
81, -701 | ERR_NO_DATA_FILE | No data file found to process. |
82, -702 | ERR_FILE_NOT_FOUND | Data file has disappeared since it was enumerated. |
83, -703 | ERR_FILE_NOT_OPENED | Even after retries, the job's data file could not be opened. |
84, -704 | ERR_NO_TRANSACTION | No job name was provided for this job. |
85, -705 | ERR_RECORD_AS_ERROR | Could not move a failed job to the error folder. |
86, -706 | ERR_RECORD_AS_PROCESSED | Could not move a processed job to the processed folder. |
87, -707 | ERR_FOLDERMONITOR_NO_ARGLIST | Folder Monitor was given no arguments at all. |
88, -708 | ERR_FOLDERMONITOR_ARGLIST | Arguments needed for Folder Monitor are missing. |
89, -709 | ERR_FOLDERMONITOR_INVALIDARGS | An argument to Folder Monitor is invalid. |
90, -710 | ERR_NO_QUEUES | The -queue1 option has not been specified. |
91, -711 | ERR_NO_SCRIPT_FOLDER | No -scriptFolder option has been provided. |
92, -712 | ERR_NO_ERROR_FOLDER | No -errorFolder option has been provided. |
93, -713 | ERR_INVALID_ERROR_FOLDER | The specified error folder name is invalid. |
94, -714 | ERR_INVALID_PROCESSED_FOLDER | The specified processed folder name is invalid. |
95, -715 | ERR_ADDING_QUEUE | Could not add another -queuen to Folder Monitor's list of queues. |
96, -716 | ERR_INVALID_SCAN_FOLDER | The folder to scan for jobs is invalid. |
98 | ERR_FAIL_STOP_MONITOR | (as of 3.0.003.20) Have your Job Processing script return this so as to both fail the job and stop the host FolderMonitor instance. |
99 | ERR_PASS_STOP_MONITOR | (as of 3.0.003.20) Have your Job Processing script return this so as to pass the job but also stop the host FolderMonitor instance before starting on a new job. |
100 | ERR_KEEP_STOP_MONITOR | (as of 3.0.003.20) Have your Job Processing script return this so as to stop the host FolderMonitor instance before starting on a new job, and keep this job in the queue for when the instance is started again. |
Process Spawning
RC | Mnemonic | Meaning |
---|---|---|
111, -801 | ERR_SPAWN_PROCESS | The creation of a process failed. |
112 | ERR_NOT_LICENSED | Non-Design, non-Merge, tool used without a license. |
113 | ERR_PIPE_PROCESS | The piping while creation of a process failed. |
Scripting
RC | Mnemonic | Meaning |
---|---|---|
121, -901 | ERR_SCRIPT_COMPILE | The JavaScript code did not compile. |
122, -902 | ERR_SCRIPT_EXECUTE | The JavaScript code had an execution error. |
123, -903 | ERR_SCRIPT_FILE_NOT_FOUND | The JavaScript file was not found. |
Xfilter
RC | Mnemonic | Meaning |
---|---|---|
-2 | MERGETRANSFORM_UCONV | uconv failed. |
-3 | MERGETRANSFORM_CC | Convert carriage control failed. |
-4 | MERGETRANSFORM_XFILTER | Error loading .xfilter file. |
Reserved for Unix
On Unix systems, process return codes are limited to 8 bits, i.e. 0
to 255
. In order to finesse our way around this obstacle we often negate the return code and in Merge at least, coalesce the higher numbered return codes to unused smaller numbers so as to be valid return codes for Unix. It's definitely a problem and one reason why we hope to replace the reporting of return codes with the reporting of meaningful strings.
Now that we have renumbered the return codes that we use, this isn't as much of a problem. However, scripts or whatnot may still give us out-of-Unix-range return codes.
RC | Mnemonic | Meaning |
---|---|---|
127 | missing command | Very often, Unix shells report 127 if they cannot find the program to be executed. |
128-140 | Unix signal | Unix often reports 128 + the applicable signal number. |
251-255 | small negatives | One often sees 255, which is because someone returned -1 |
User
RC | Mnemonic | Meaning |
---|---|---|
200-250 | reserved for you | If your scripts or filters or whatever you run issue a return code, it would be nice if it were in this range. |