Error codes of cScript. Some of the cScript functions returning the error codes of the used InDesign® functions directly. In case of some errors, this is kFailure (== -1) in most cases. Anyway, a list of the used error codes of InDesign® API function you will find here.

Using serror you can get a short text description of most of the cScript error codes.

The following script will write a complete list of the error descriptions to the log file.

int main ()
{
	int i;

	for (i=0; i < 4200; i++)	wlog ("", "%d : %s\n", i, serror (i));
return 0; }

Here is a complete list of the error codes used:

Name Error number
kBreakExecution 4000
kRollbackExecution 4001
eofErr End of file -39
fnfErr File not found -43
unzipErr Error during unzipping -42
zipErr Error during zipping -41
wrPermErr Write permission on file/folder -61
permErr Permission denied -54
dupFNErr Duplicate file name -48
paramErr Parameter error -50
memFullErr Memory full -108
Function not implemented -1199
fidNotFound File identifier not found -1300
fidExists File identifier already exists -1301
notAFileErr Not a file -1302

tableRefErr
tableIndexErr
tableTextModelErr
noTablesErr
tableNotFoundErr
tableCreateCommandErr
tableTextContainerErr

11
12
13
14
15
16
17

colorErr
noImageErr
textAttributeErr
textVarianteErr
textCommandErr
textNoModelErr
textSizeErr
textFontMgrErr
textFontNotFoundErr
textColorErr

textTintErr
textAlignErr
textDeleteErr
textReplaceErr
noFrontDocumentErr
noFrameGeometryErr
selectionOutOfRangeErr
documentCreateErr
documentOpenErr
documentSaveErr

documentCloseErr
idleTimerStartErr
cannotCreateTmpFileErr
cannotOpenTmpFileErr

100
101
102
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117
118
119

120
121
122
123

textModelErr
docNotFoundErr
docFontMgrNotFoundErr
fontCommandCreateErr
fontFaceNotFoundErr
fontNotFoundErr
cannotSetFontErr
cannotSetFontFaceErr
skewOutOf85Err
colorNotFoundErr

textFrameListErr
textLinkErr
actionWithNoDestinationErr
profileNotFoundErr
cannotSetProfileErr
fileVersionToNewErr
fileVersionToOldErr

200
201
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216

noTextModelErr
noDestTextModelErr
rangErr
lengthErr
uidDataNotFoundErr
rangeDataNotFoundErr
processCommandErr
emptySettingNameErr
settingNotFoundErr
noWorkspaceErr

paraStyleTableNotFoundErr
panelNotFoundErr
noFrameListErr
noSelectionErr

300
301
302
303
304
305
306
307
308
309

310
311
312
313

noDatabaseErr
xmlQueryExecErr sqlExecErr soapExecErr
sqlNoProcedureErr
scriptExecErr
noScriptParserErr
createQueryErr
noDataFoundErr

400
401
402
403
404
405
406

noXMLElementErr
noDatumErr
noSenderErr
noStartTimeErr
unknownSenderErr
progLinkListLoadErr
conditionListLoadErr
outputCmdListLoadErr
findAndReplaceListLoadErr
conditionOutputCmdErr

unknownBuiltInErr
listingIsOversetErr
insertTaggedTextErr
taggedTextErr
createCmdSequErr
createCmdErr
createCmdDataErr
createFitFrameCmdErr
fitFrameCmdErr
createResizeCmdErr

resizeFrameCmdErr
createMoveCmdErr
moveFrameCmdErr
rotateFrameCmdErr

500
501
502
503
504
505
506
507
508
509

510
511
512
513
514
515
516
517
518
519

520
521
522
523

xmlNoTextFrameErr
xmlInvalidTextFrameErr
invalidUIDErr

600
601
602

outOfMemErr

700

beginTagNotFoundErr
endTagNotFoundErr
tagAttributesErr
deleteDisplayedTagsErr
replaceTagTextErr
applyTagErr
displayTagsErr
tagGenerellSyntaxErr // Check if tag<tagdef> is found in the text
tagOpenErr // < not found in tag
tagCloseErr // > not found in tag

800
801
802
803
804
805
806
807
808
809
810

createImportCmdErr
createPlaceFileDataErr
createImportCmdDataErr
noServiceRegistryErr
noServiceProviderErr
noImportManagerOptionsErr
noStreamErr
cannotOpenStream
placeHolderStmtNotFoundErr
placeHolderTypeClashErr

cannoSetPlaceholderErr
cannoRemovePlaceholderErr

900
901
902
903
904
905
906
907
908
909

910
911

startDayMissing

1000

libraryCmdNotFoundErr
libraryNilErr
libraryAssetCollectErr
libraryAssetMetaDataErr
libraryAssetNotFoundErr
libraryPlaceItemErr
layoutControlDataErr
hierarchyNotFoundErr
getScrapControllerErr
dataExchangeHandlerErr

dataExchangeInternalizeErr
scrapDataEmptyErr
geometryNotFoundErr
geometryNotValidErr
copyCmdErr
parameterMissingErr
itemEmptyErr
textScriptErr
textSQLErr
frameScriptErr

frameSQLErr
parentFrameNotFoundErr

1100
1101
1102
1103
1104
1105
1106
1107
1108
1109

1110
1111
1112
1113
1114
1115
1116
1117
1118
1119

1120
1121

cannotFindLayerErr
frontLayoutNotFoundErr
selectLayerErr
setVisibleLayerErr
mergeLayerErr
deleteLayerErr
moveLayerErr
removeLayerErr
addLayerErr
renameLayerErr

tooManyLayersErr
duplicateLayerNameErr
layerListNotFoundErr
createPageItemDataErr
dataBaseEmptyErr
cannotCreateTextFrameErr
cannotCreateColumnsErr
invalidObjectErr
pageListNotFoundErr
pageNotFoundErr

masterSpreadNotFoundErr
noSpreadListErr
metaDataCreateErr
applyMultAttributesCmdErr
xpAttributeUtilsErr
pathGeometryErr
cannotChangePathGeomtryErr
scrapItemErr
deleteFrameErr
setSelectionToolErr

selectFrameErr
linkListTypeErr
linkListEmptyErr
accessDeniedErr
xmlPathMissingErr
xmlPathNotFoundErr
inlineDataNotFoundErr
textFrameNotFoundErr
xmlQueryErr
createPrinterCmdErr

createPrinterCmdDataErr
printerProfilesListNoFoundErr
printerProfileNotDefinedErr
graphXMLFilenotValidErr
frameNotFoundErr
emptyGraphErr
cannotAskPageItemTypeErr
pageItemNotDefinedErr
cannotSetFirstPageTypeErr
bookmarkNotFoundErr

bookmarkEmptyErr
kCannotGroupErr
kCannotUngroupErr
sizeErr
overlapErr
pageTooSmallErr
circleErr
selfLinkErr
docCrossLinkErr
tableInOversetErr

tocStyleTableNotFoundErr
tocStyleNotFoundErr
cannotCreateTOCErr
cannotFormatTOCErr
pageAdaptErr
concurrentAccessErr
wrongColumnsForCompressErr
noPageAdapterLicenseErr
noCometLicenseErr
pageTemplateNotFoundErr

pageTemplateOpositeNotFoundErr
pageTemplateEmptyErr
pasteBoardDocErr
notForServerErr
cannotMoveSubFrameToLayerErr
cannotSetShortcuts
noHyperlinkErr
cannotRemoveOversetErr
maxWidthTooSmallErr
emergencyExitErr

cannotRevertDocErr
clippingPathNotFoundErr
clippingIndexNotFoundErr
clippingPathMissingErr
cannotHaveClippingPathErr
cannotSetClippingPathErr
wrongAlphaChannelIndexErr
unknownTextAttributeErr
allocatedStringTooShortErr

preflightNotEmptyErr

cannotCreateProcessErr
mailAccountNotFoundErr
tablePageItemError
tableTextStoryError
urllinkFileNeverSavedErr
urllinkCannotGetLinkStateErr
urllinkInvalidURLErr
urllinkNoDownloadResultErr
urllinkDownloadFailedErr
urllinkCannotEmbedImageErr

urllinkCannotLinkImageErr
urllinkCannotUpdateImageErr
urllinkUnknownLinkTypeErr

cannotMergeCellsErr
importFromSameDocumentErr
unknownStyleClassErr
unknownClashResolutionErr
wrongIconIndex
pluginNotSupport
proLicenseMissingErr
cannotPackAllItems
cannotMoveAllFrames

1200
1201
1202
1203
1204
1205
1206
1207
1208
1209

1210
1211
1212
1213
1214
1215
1216
1217
1218
1219

1220
1221
1222
1223
1224
1225
1226
1227
1228
1229

1230
1231
1232
1233
1234
1235
1236
1237
1238
1239

1240
1241
1242
1243
1244
1245
1246
1247
1248
1249

1250
1251
1252
1253
1254
1255
1256
1257
1258
1259

1260
1261
1262
1263
1264
1265
1266
1267
1268
1269

1270
1271
1272
1273
1274
1275
1276
1277
1278
1279

1280
1281
1282
1283
1284
1285
1286
1287
1288
1289

1290
1291
1292
1293
1294
1295
1296
1297
1298
1299

1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311

unknownErr

2000

fileAccessErr
fileNotFoundErr
notFoundErr
indexOutOfBoundsErr
parameterValueErr
cancelledErr
documentErr
typeErr
dimensionsErr
notUniqueErr

notSupportedErr
contextErr
lockedErr
connectionErr
notOpenErr

3000
3001
3002
3003
3004
3005
3006
3007
3008
3009

3010
3011
3012
3013
3014

Error codes of Comet Javascript API.

Name Error Number

CScript Error

538624

No License

538625

Internal Error, most probably: NOT YET IMPLEMENTED

538626
Initialization Error 538627
Document Not Found Error 538628
Illegal Document Status Error 538629
Document Outdated Error 538630
Document Vanished Error

538631

Often the problem is that the requeseted document has not been opened with app.comet.documentOpen.

Malformed XML Error 538632
Invalid XML Error 538633
Page Not Found Error 538634
Invalid Bounds Error 538635
Spread Not Found Error 538636
Group Not Found Error 538637
Element Not Found Error 538638
Placeholder Not Found Error 538639
Unknown PDF Profile Error 538640
Invalid Template ID 538641
Invalid Setup Params 538642
Connection required 538643
Fatal unrecoverable Error 538644
Bad Position 538645
Invalid Grid ID 538646
Build Error 538647
Invalid Options 538648
Unknown Service 538654
Authorization Failure 538655
Unknown Pool 538656
Connection Failed 538657
Server was down 538658
Unknown Export Format 538659
Unknown Masterpage 538660
Illegal Argument 538674

SOAP connections of priint:comet plug-ins and comet_pdf are implemented using gSOAP written by Robert A. van Engelen. All available functions and their return codes are described in the In the gSOAP User Guides.: