On this Page

    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

    RCMnemonicMeaning

    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, -201ERR_MERGE_ARGLISTInvalid or missing argument list.
    42, -202ERR_MERGE_NOFONTSThe configuration has no fonts defined.
    43, -203ERR_MERGE_CANNOTLOGLog file undefined or not writable.
    44, -204ERR_MERGE_NOCONFIGMissing or invalid Configuration file.
    45, -205ERR_MERGE_NOFORMFILENo form file specified.
    46, -206ERR_MERGE_NODATAFILENo data file specified.
    47, -207ERR_MERGE_LOADSCRIPTError loading the -scriptFile script.
    48, -208ERR_MERGE_FILTERA filter provided a non-zero return code.
    49, -209ERR_MERGE_FORMLOADCould not load the form file.
    50, -210ERR_MERGE_WORDWRAPFORMCould not word wrap the text in a document.
    51, -211ERR_MERGE_PROCESSSCRIPTError processing any Merge event script.
    52, -212ERR_MERGE_DATAOPENCould not open the data file.
    53, -213ERR_MERGE_DATAPROCESSError while processing all the data documents.
    54, -214ERR_MERGE_FORMANDDATAError merging the data with the form design.
    55, -215ERR_MERGE_EMBEDDEDFIELDSError while embedding [fields] in the document.
    56, -216ERR_MERGE_WORDWRAPDOCError word-wrapping the document.
    57, -217ERR_MERGE_PAGINATEError paginating the document.
    58, -218ERR_MERGE_PRINTDOCUMENTError printing the document.
    59, -219ERR_MERGE_GLOBALSError while copying global values to applicable global fields.
    60, -220ERR_MERGE_AUTOFIELDSError while populating the automatic fields.
    61, -221ERR_MERGE_TO_TOO_LONGunused
    62, -222ERR_MERGE_CC_TOO_LONGunused
    63, -223ERR_MERGE_BCC_TOO_LONGunused
    64, -224ERR_MERGE_ATTACH_TOO_LONGunused
    65, -225ERR_MERGE_NO_OUTPUT_DATAName not provided for the creation of sample data.
    66, -226ERR_MERGE_CREATE_SAMPLE_DATACould not create the sample data.
    67, -227ERR_MERGE_MISSING_PROFILECould not load profile (including printer table).
    68, -228ERR_MERGE_PLACEHOLDERSFailed to process placeholders.

    PDFExtract

    The negative PDFExtract return codes were in use up to 3.1.001.16

    RCMnemonicMeaning

    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

    RCMnemonicMeaning
    81, -701ERR_NO_DATA_FILENo data file found to process.
    82, -702ERR_FILE_NOT_FOUNDData file has disappeared since it was enumerated.
    83, -703ERR_FILE_NOT_OPENEDEven after retries, the job's data file could not be opened.
    84, -704ERR_NO_TRANSACTIONNo job name was provided for this job.
    85, -705ERR_RECORD_AS_ERRORCould not move a failed job to the error folder.
    86, -706ERR_RECORD_AS_PROCESSEDCould not move a processed job to the processed folder.
    87, -707ERR_FOLDERMONITOR_NO_ARGLISTFolder Monitor was given no arguments at all.
    88, -708ERR_FOLDERMONITOR_ARGLISTArguments needed for Folder Monitor are missing.
    89, -709ERR_FOLDERMONITOR_INVALIDARGSAn argument to Folder Monitor is invalid.
    90, -710ERR_NO_QUEUESThe -queue1 option has not been specified.
    91, -711ERR_NO_SCRIPT_FOLDERNo -scriptFolder option has been provided.
    92, -712ERR_NO_ERROR_FOLDERNo -errorFolder option has been provided.
    93, -713ERR_INVALID_ERROR_FOLDERThe specified error folder name is invalid.
    94, -714ERR_INVALID_PROCESSED_FOLDERThe specified processed folder name is invalid.
    95, -715ERR_ADDING_QUEUECould not add another -queuen to Folder Monitor's list of queues.
    96, -716ERR_INVALID_SCAN_FOLDERThe folder to scan for jobs is invalid.
    98ERR_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.
    99ERR_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.
    100ERR_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

    RCMnemonicMeaning
    111, -801ERR_SPAWN_PROCESSThe creation of a process failed.
    112ERR_NOT_LICENSEDNon-Design, non-Merge, tool used without a license.
    113ERR_PIPE_PROCESSThe piping while creation of a process failed.

    Scripting

    RCMnemonicMeaning
    121, -901ERR_SCRIPT_COMPILEThe JavaScript code did not compile.
    122, -902ERR_SCRIPT_EXECUTEThe JavaScript code had an execution error.
    123, -903ERR_SCRIPT_FILE_NOT_FOUNDThe JavaScript file was not found.

    Xfilter

    RCMnemonicMeaning
    -2MERGETRANSFORM_UCONVuconv failed.
    -3MERGETRANSFORM_CCConvert carriage control failed.
    -4MERGETRANSFORM_XFILTERError 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.

    RCMnemonicMeaning
    127missing commandVery often, Unix shells report 127 if they cannot find the program to be executed.
    128-140Unix signalUnix often reports 128 + the applicable signal number.
    251-255small negativesOne often sees 255, which is because someone returned -1

    User

    RCMnemonicMeaning
    200-250reserved for youIf your scripts or filters or whatever you run issue a return code, it would be nice if it were in this range.