ALL functions in the Rosetta xtra will return a negative number when encountering an error. Please note that even if the function specifications in the documentation specifies a different return data type under normal circumstances, Rosetta xtra will always return negative integers during errors. Using negative integers helps developers easily catch errors because this error handling technique is universal to all functions. There is no need to write different error handling schemes for each function category.
The error catching techniques used in Rosetta are quite extensive. Some of the more general error codes are listed below.
| Error code | Description |
|---|---|
| -1 | Xtra not registered: This function will not be allowed in projector mode without a valid registration key. |
| -2 | Xtra instance has been closed. Can not make further calls on this instance. |
| -3 | This function is not supported in Authorware. |
| -10 | Incorrect parameter, float parameter out of bounds. the float parameter is incorrect. |
| -11 | Incorrect parameter, expected member reference in parameter. |
| -12 | Incorrect parameter, integer out of bounds. the integer parameter is incorrect |
| -13 | Incorrect parameter, string parameter length is 0. The string value can not be EMPTY. |
| -14 | Incorrect parameter, list expected. |
| -15 | Incorrect parameter, list size is 0. |
| -16 | Incorrect parameter, rgb color expected. |
| -17 | Incorrect parameter, property list expected. |
| -18 | Incorrect parameter, the expected property named can not be found. |
| -19 | Incorrect parameter, expecting string value in list. |
| -20 | Incorrect parameter, expecting integer value in list. |
| -21 | Incorrect parameter, expecting a reference of a bitmap cast member. |
| -22 | Incorrect parameter: expecting integer or float. |
| -23 | Incorrect parameter: expecting Director image object. |
| -24 | Incorrect parameters: expecting 2 lists with the same size. |
| -25 | Incorrect parameter: expecting integer, float or string. |
| -26 | Incorrect parameter: parameter not supported in Authorware. |
| -31 | Could not obtain member's image information. Director internal error. |
| -32 | Could not find cast library from member. Director internal error. |
| -33 | Could not find cast member. Director internal error. |
| -34 | Could not create a new cast member. Director internal error. |
| -35 | Could not set new image data into cast member. Director internal error. |
| -36 | Cast Library does not exist. |
| -41 | Could not obtain the stage rect. |
| -51 | User cancelled dialog box. |
| -61 | Function not supported in this version. Director 8.5 or higher is required. |
| -98 | Unknown XDK error. |
| -99 | Unknown error. Non XDK related. |
| -110 | Operating system's error in allocating memory. |
| -111 | Operating system's error in locking file. |
| -112 | Could not obtain screen image data. Screen data obtained was invalid. |
| -113 | Could not gain access to file. Does file exist? |
| -114 | Could not obtain file time. |
| -115 | Could not set new file time |
| -116 | Date conversion error. Check the parameters values for the dates. Are they within range? |
| -117 | Could not obtain the root of the Shell's namespace. |
| -118 | Could not get File size. |
| -119 | Could not read file version information. |
| -121 | Path is invalid. |
| -122 | Folder does not exist. |
| -123 | File name invalid. |
| -124 | File extension invalid. |
| -125 | Path length is longer than the legal limit. ( Over 256 characters ) |
| -126 | File does not exist. |
| -130 | Could not access the system clipboard. |
| -131 | Could not determine current Operating System. |
| -132 | Could not obtain disk free space. |
| -133 | Could not get volume information. |
| -134 | Could not get time zone information. |
| -140 | Error in trying to retrieve the list of printers. |
| -141 | No printer exists in system. |
| -150 | The operating system is out of memory or resources. |
| -151 | The specified file was not found. |
| -152 | The specified path was not found. |
| -153 | The .exe file is invalid (non-Microsoft Win32® .exe or error in .exe image). |
| -154 | The operating system denied access to the specified file. |
| -155 | The file name association is incomplete or invalid. |
| -156 | The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed. |
| -157 | The DDE transaction failed. |
| -158 | The DDE transaction could not be completed because the request timed out. |
| -159 | The specified dynamic-link library (DLL) was not found. |
| -160 | The specified file was not found. |
| -161 | There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable. |
| -162 | There was not enough memory to complete the operation. |
| -163 | The specified path was not found. |
| -164 | A sharing violation occurred. |
| -170 | Error in registering new window class. |
| -171 | Error in creating child window. |
| -172 | Could not load windows control. |
| -173 | Error in creating control window. |
| -174 | File is empty or RTF is invalid. |
| -199 | Unknown system error. |
| -211 | No image available in memory. You need to first open an image before calling this function. |
| -221 | This file extension not supported. |
| -241 | Could not read/parse image correctly. |
| -242 | Image data invalid. |
| -299 | Unknown image parsing/saving error. |
| -310 | Can not have the zip function and unzip function using the same file at the same time. |
| -311 | Can not create new zip file if existing zip file isn't closed first. |
| -312 | Error in trying to create/open a zip file. |
| -313 | No zip file has been created. Operation failed. |
| -314 | No unzip file has been created. Operation failed. |
| -315 | Can not create new unzip file if existing unzip file isn't closed first. |
| -398 | Internal error. Use getErr() to check error string. |
| -399 | Unexpected error in zip compression. |
| -408 | Automation failed. This version of Microsoft office doesn't support this property. |
| -409 | Automation failed. This parameter value is incorrect. |
| -410 | Automation failed. vTable could not find name? this version doesn't support this property. |
| -411 | Internal IDispatch error, NULL parameter found. |
| -412 | Application currently not open. You can not call this method without creating a new document or opening an existing document. |
| -413 | Error in trying to set this property, The parameter value is incorrect. |
| -414 | Application have not been launched. This method is not available until the application is launched. |
| -430 | Casting to integer error. Error in trying to convert type to integer. |
| -431 | Integer parameter value is out of range. |
| -432 | Casting to float error. Error in trying to convert type to float. |
| -510 | Can not find Microsoft PowerPoint. Is PowerPoint installed? |
| -511 | Error in creating a new slide. |
| -512 | No presentation is open. Can not call this method without first creating an active presentation. |
| -513 | No slide is open. Can not insert new objects before creating at least 1 slide. |
| -514 | Similar to -512, no presentation was opened. Can not call this method without an active presentation. |
| -515 | No slide master was available. Is there a presentation open? |
| -516 | Error when trying to call the open method to Microsoft PowerPoint. Could be the file type is invalid. |
| -517 | Need to insert a text box before setting this attribute. |
| -518 | The selected printer doesn't exist. |
| -519 | Could not set application window hidden. |
| -520 | PowerPoint Viewer does not support this function. |
| -530 | Error in trying to set text. Powerpoint internal error. |
| -599 | Unknown PowerPoint error. |
| -610 | Can not find Microsoft Excel. CLSID is not registered with the system. Is app installed? |
| -612 | No active Sheets is open. Can not call this method without first creating an active presentation. |
| -613 | No sheet is currently open. Can't insert new objects without first creating an active sheet. |
| -614 | No workbook is open. Can't call this method without an active workbook. |
| -615 | No range is available. You need to set a range before tying to call this method. |
| -616 | No chart is available. You need to create a chart before trying to call this method. |
| -630 | Cell string format is incorrect. |
| -631 | Cell position parsing error. |
| -699 | Unknown Excel error. |
| -714 | No document is currently open. Can not call this method without a document open. |
| -810 | Password length too short. |
| -811 | Error in trying to open source file. |
| -812 | Error in trying to open target file. |
| -814 | Error in trying to authenticate file. Most likely file has been modified after encryption. |
| -899 | Unknown crypt error. |
| -910 | Error in trying to open file. |
| -911 | File is not open. Can not call this method without first opening a file. |
| -912 | Invalid data type parameter. |
| -913 | Error reading, End of file reached. |
| -999 | Unknown IO Error. |
| -1010 | Error in trying to open database. |
| -1099 | Unknown database error. |
| -1210 | Error in trying to open connection. Check err() for more details. |
| -1211 | Error in trying to close connection. |
| -1212 | Database's connection isn't open. |
| -1213 | No recordset open. |
| -1214 | Already at end of recordset. |
| -1215 | Already at beginning of recordset. |
| -1216 | Wrong number of query parameters. |
| -1217 | Field name not found. |
| -1299 | Unknown database error. |
| -1310 | Error in reading registry key. |
| -1311 | Error in writing to registry. |
| -1312 | registry key string is invalid. |
| -1313 | Error in opening registry key. |
| -1314 | Error in querying registry key. |
| -1315 | Parameter for #Type is not valid. |
| -1316 | Sub key string is invalid. |
| -1399 | Unknown registry writing error. |
| -1410 | Error in reading PNG image file. |
| -1499 | Unknown PDF creation error. |