8 #include "BasicTypes/WUTypes.h"
11 //const WTErr eNoErr = 0; // moved to #include "WavesPublicAPI/WTErr.h"
12 const WTErr eGenericErr = -1;
13 const WTErr eUserCanceled = -2;
14 const WTErr eUnknownErr = -3;
15 const WTErr eExceptionErr = -4;
16 const WTErr eEndianError = -5;
17 const WTErr eThreadSafeError = -6;
18 const WTErr eSomeThingNotInitailzed = -7;
19 const WTErr eWrongObjectState = -8; //!< object was not in an acceptable state
20 const WTErr eUninitalized = -9;
21 const WTErr eDeprecated = -10;
22 const WTErr eCommandLineParameter = -11;
23 const WTErr eNotANumber = -12; //!< expected a number but none was found
24 const WTErr eNotJustANumber = -13; //!< expected a number and found one but also other stuff (e.g. "123XYZ")
25 const WTErr eNegativeNumber = -14; //!< expected a positive number and found a negative
26 const WTErr eTimeOut = -15; //!< something timed out
27 const WTErr eCoreAudioFailed = -16; //!< Error in a core audio call
28 const WTErr eSomeThingInitailzedTwice = -17;
29 const WTErr eGenerateHelpInfo = -18;
30 const WTErr eOutOfRangeNumber = -19;
31 const WTErr eMacOnlyCode = -20;
32 const WTErr eWinOnlyCode = -21;
33 const WTErr eAppLaunchFailed = -22; //!< failed to launch an application
34 const WTErr eAppTerminateFailed = -23; //!< failed to terminate an application
35 const WTErr eAppReturnedError = -24; //!< Non zero exit code from application
36 const WTErr eNotImplemented = -25; //!< Function is not implmemented
37 const WTErr eNotEmpty = -26; //!< Something was expected to be empty but is not
38 const WTErr eAsioFailed = -27;
40 // File Manager errors
41 const WTErr eFMNoSuchVolume = -1001;
42 const WTErr eFMFileNotFound = -1002;
43 const WTErr eFMFileAllreadyExists = -1003;
44 const WTErr eFMAllreadyOpenWithWritePerm = -1004;
45 const WTErr eFMEndOfFile = -1005;
46 const WTErr eFMPermissionErr = -1006;
47 const WTErr eFMBusyErr = -1007;
48 const WTErr eFMOpenFailed = -1008;
49 const WTErr eFMTranslateFileNameFailed = -1009;
50 const WTErr eFMWTPathRefCreationFailed = -1010;
51 const WTErr eFMReadFailed = -1011;
52 const WTErr eFMIllegalPathRef = -1012;
53 const WTErr eFMFileNotOpened = -1013;
54 const WTErr eFMFileSizeTooBig = -1014;
55 const WTErr eFMNoSuchDomain = -1015;
56 const WTErr eFMNoSuchSystemFolder = -1016;
57 const WTErr eFMWrongParameters = -1017;
58 const WTErr eFMIsNotAFolder = -1018;
59 const WTErr eFMIsAFolder = -1019;
60 const WTErr eFMIsNotAFile = -1020;
61 const WTErr eFMIsAFile = -1021;
62 const WTErr eFMDeleteFailed = -1022;
63 const WTErr eFMCreateFailed = -1023;
64 const WTErr eFMPathTooLong = -1024;
65 const WTErr eFMIOError = -1025;
66 const WTErr eFMIllegalOpenFileRef = -1026;
67 const WTErr eFMDiskFull = -1027;
68 const WTErr eFMFileNotEmpty = -1028;
69 const WTErr eFMEndOfFolder = -1029;
70 const WTErr eFMSamePath = -1030;
71 const WTErr eFMPathTooShort = -1031;
72 const WTErr eFMIncompletePath = -1032;
73 const WTErr eFMIsNoAFileSystemLink = -1033;
74 const WTErr eFMSymlinkBroken = -1034;
75 const WTErr eFMMoveFailed = -1035;
76 const WTErr eFMWriteFailed = -1036;
77 const WTErr eFMTooManyOpenFiles = -1037;
78 const WTErr eFMTooManySymlinks = -1038;
81 const WTErr eGenericSystemError = -2000;
82 const WTErr eSysNoEnvironmentVariable = -2001;
83 const WTErr eDLLLoadingFailed = -2002;
84 const WTErr eFuncPoinerNotFound = -2003;
85 const WTErr eDLLNotFound = -2004;
86 const WTErr eBundleNotLoaded = -2005;
87 const WTErr eBundleCreateFailed = -2006;
88 const WTErr eBundleExecutableNotFound = -2007;
89 const WTErr eNotABundle = -2008;
90 const WTErr eInvalideDate = -2009;
91 const WTErr eNoNetDevice = -2010;
92 const WTErr eCacheCreatedFromResource = -2011;
93 const WTErr eNotAValidApplication = -2012;
95 // Resource Manager errors
96 const WTErr eRMResNotFound = -3000;
97 const WTErr eRMResExists = -3001; //!< a resource exist even though it's not expected to
98 const WTErr eRMContainerNotFound = -3002; //!< The container was not found in the list of containers
99 const WTErr eRMResRefNotFound = -3003; //!< The resRef was not found in container's resource list
100 const WTErr eRMInvalidResRef = -3004;
101 const WTErr eRMInvalidResContainer = -3005;
102 const WTErr eRMInvalidNativeResContainer = -3006;
103 const WTErr eRMAttachResContainerFailed = -3007;
104 const WTErr eRMInvalidResID = -3008;
105 const WTErr eRMResUpdateFailed = -3009;
107 // Graphic Manager & GUI errors
108 const WTErr eGMIsNotInitailzed = -3500;
109 const WTErr eGMInvalidImage = -3501;
110 const WTErr eGMGenericErr = -3502;
111 const WTErr eGMNoCurrentContext = -3503;
112 const WTErr eGUISkinNotFound = -3504;
113 const WTErr eGMNoVertices = -3505;
114 const WTErr eGMNoColors = -3506;
115 const WTErr eGMNoTexture = -3507;
116 const WTErr eGMIncompatibleOGLVersion = -3508;
117 const WTErr eGMNoDeviceContext = -3509;
118 const WTErr eGMNoPixelFormat = -3510;
119 const WTErr eGMNoOGLContext = -3511;
120 const WTErr eGMNoOGLContextSharing = -3512;
121 const WTErr eGMUnsupportedImageFormat = -3513;
122 const WTErr eGMUninitializedContext = -3514;
123 const WTErr eControlOutOfRange = -3515;
124 const WTErr eGMUninitializedFont = -3516;
125 const WTErr eGMInvalidFontDrawMethod = -3517;
126 const WTErr eGMUnreleasedTextures = -3518;
127 const WTErr eGMWrongThread = -3519;
128 const WTErr eGMDontCommitDraw = -3520;
129 // Errors in the -5000 -> -5999 are defined in Waves-incs.h
132 const WTErr eMemNewFailed = -4001; //!< Something = new CSomething, returned null
133 const WTErr eMemNewTPtrFailed = -4002; //!< NewTPtr or NewTPtrClear failed
134 const WTErr eMemNullPointer = -4003; //!< a null pointer was encountered where it should not
135 const WTErr eMemObjNotInitialized = -4004;
136 const WTErr eMemBuffTooShort = -4005; //!< the buffer in question did not have enough space for the operation
137 const WTErr eInstanciationFailed = -4006;
138 const WTErr eMemAddressSpaceError = -4007; //!< memory falls outside the legal address space
139 const WTErr eMemBadPointer = -4008;
140 const WTErr eMemOutOfMemory = -4009;
143 const WTErr eXMLParserFailed = -6001;
144 const WTErr eXMLTreeNotValid = -6002;
145 const WTErr eXMLTreeEmpty = -6003;
146 const WTErr eXMLElementMissing = -6004;
147 const WTErr eXMLElementUninitalized = -6005; //!< element was default constructed it has not element name, etc..
148 const WTErr eXMLElementIncomplete = -6006; //!< XML parser did not complete building the element
149 const WTErr eXMLAttribMissing = -6007;
152 const WTErr ePresetFileProblem = -7860;
153 const WTErr eInvalidFileFormatProblem = -7861;
154 const WTErr ePresetLockedProblem = -7862;
155 const WTErr ePresetInfoNotFound = -7863;
156 const WTErr eDuplicatePluginSpecificTag = -7959;
157 const WTErr ePluginSpecifcNotExisting = -7960;
158 const WTErr eBuffSizeToSmall = -7961;
159 const WTErr eCreatingPopupWhereAnItemExists = -7962;
160 const WTErr eDeletePluginSpecifcFailed = -7963;
161 const WTErr eFactoryPresetNumOutOfRange = -7964;
162 const WTErr eNoFactoryPresets = -7965;
163 const WTErr eLoadPresetToPlugin_vec_empty = -7966;
164 const WTErr eFactoryPresetNotFound = -7967;
165 const WTErr eCantCreateUserPrefFile = -7968;
166 const WTErr eDataFormatNotSupported = -7969;
167 const WTErr eCantLoadProcessFunction = -7970;
168 const WTErr eIllegalChunkIndex = -7971;
169 const WTErr eIllegalChunkID = -7972;
170 const WTErr eIllegalChunkVersion = -7973;
174 const WTErr eNotAPluginFile = -8001;
175 const WTErr eFaildToLoadPluginDLL = -8002;
176 const WTErr eNoPluginManager = -8003;
177 const WTErr eGetAvailablePluginsFailed = -8004;
178 const WTErr eNoPluginsAvailable = -8005;
179 const WTErr ePluginSubComponentNotFound = -8006;
180 const WTErr ePluginOpenFailed = -8007;
181 const WTErr eSubComponentRejected = -8009; //!< user did not want this sub-component - probably through preferences
182 const WTErr eIncompatibleNumOfIOs = -8010; //!< e.g. surround sub-component in stereo only shell
183 const WTErr eStemProblem = -8011; //!< Some problem with stems
184 const WTErr eComponentTypeNotSupported = -8012;
185 const WTErr ePluginNotLoaded = -8013;
186 const WTErr ePluginInstanceNotCreate = -8014;
187 const WTErr ePluginAlgNotCreate = -8015;
188 const WTErr ePluginGUINotCreate = -8016;
189 const WTErr eMissmatchChannelCount = -8017;
190 const WTErr eIncompatibleVersion = -8018;
191 const WTErr eIncompatibleAffiliation = -8019;
192 const WTErr eNoSubComponentsFound = -8020;
195 const WTErr eNetShellInitFailed = -9001;
198 const WTErr eWLSLicenseFileNotFound = -10001;
199 const WTErr eWLSPluginNotAuthorized = -10002;
200 const WTErr eWLSNoLicenseForPlugin = -10003;
201 const WTErr eWLSInvalidLicenseFileName = -10004;
202 const WTErr eWLSInvalidLicenseFileContents = -10005;
203 const WTErr eWLSInvalidDeviceID = -10006;
204 const WTErr eWLSInvalidClientID = -10007;
205 const WTErr eWLSLicenseFileDownloadFailed = -10008;
206 const WTErr eWLSNoLicensesForClientOrDevice = -10009;
207 const WTErr eWLSNoLicensesForSomePlugins = -10010;
209 // Communication errors
210 const WTErr eCommEndOfRecievedMessage = -11001;
211 const WTErr eCommSocketDisconnected = -11002;
213 // Window Manager Errors
214 const WTErr eWMEventNotHandled = -12001;
215 const WTErr eWMDisposeViewFailed = -12002;
217 // Plugin View Manager Errors
218 const WTErr ePVMPlatformNotSupported = -13001;
219 const WTErr ePVMAlreadyInitialized = -13002;
220 const WTErr ePVMIllegalParent = -13003;
221 const WTErr ePVMCannotCreateView = -13004;
222 const WTErr ePVMNothingSelected = -13005;
223 const WTErr ePVMDisabledItemChosen = -13006;
224 const WTErr ePVMMenuItemNotFound = -13007;
225 const WTErr ePVMMenuItemNotASubMenu = -13008;
226 const WTErr ePVMUnknownMenu = -13009;
227 const WTErr ePVMEmptyNativeViewRef = -13010;
228 const WTErr ePVMGenericError = -13011;
229 const WTErr ePVMFunctionNotImplemented = -13012;
231 // Plugin View Manager - Menu Errors
232 const WTErr ePVMCannotCreateMenu = -13501;
233 const WTErr ePVMCannotSetMenuFont = -13502;
234 const WTErr ePVMCannotSetMenu = -13503;
235 const WTErr ePVMItemParentNotExists = -13504;
237 // Plugin View Manager - TextField Errors
238 const WTErr ePVMCannotCreateTextField = -13553;
239 const WTErr ePVMCannotEmbedTextField = -13554;
240 const WTErr ePVMNoTextToValidate = -13555;
241 const WTErr ePVMTextTooLong = -13556;
242 const WTErr ePVMIllegalCharacter = -13557;
245 // Meter Manager Errors
246 const WTErr eMM_MeterGetMeterValueForParameterNotConnected = -14000 ;
249 //Surface Driver Manager Errors
250 const WTErr eSDM_SurfaceDriverAPIFailed = -14101;
253 const WTErr eIPC_CreateNamedPipeFailed = -14200;
254 const WTErr eIPC_OpenPipeTimeout = -14201;
255 const WTErr eIPC_DeleteNamedPipeFailed = -14202;
256 const WTErr eIPC_SelectOnNamedPipeFailed = -14203;
257 const WTErr eIPC_ReadFromNamedPipeFailed = -14204;
258 const WTErr eIPC_ReadEndOfFileFromNamedPipe = -14205;
259 const WTErr eIPC_CloseNamedPipeFailed = -14206;
260 const WTErr eIPC_ParseArgsFailed = -14207;
261 const WTErr eIPC_OpenPipeFailed = -14208;
262 const WTErr eIPC_SendMsgFailed = -14209;
263 const WTErr eIPC_SendCommandInvalid = -14210;
264 const WTErr eIPC_QtTestMode = -14211;
265 const WTErr eIPC_ChangePermissionOnPipe = -14212;
266 const WTErr eIPC_ConnectionLost = -14213;
268 const WTErr eIPC_InvalidRole = -14213;
269 const WTErr eIPC_CreateNamedPipeM2SFailed = -14214;
270 const WTErr eIPC_CreateNamedPipeS2MFailed = -14215;
271 const WTErr eIPC_ChangePermissionOnPipeM2S = -14216;
272 const WTErr eIPC_ChangePermissionOnPipeS2M = -14217;
273 const WTErr eIPC_OpenReadPipeFailed = -14218;
274 const WTErr eIPC_OpenReadPipeDIsableSigPipe = -14219;
275 const WTErr eIPC_OpenWritePipeFailed = -14220;
276 const WTErr eIPC_WritePipeFailed = -14221;
277 const WTErr eIPC_WritePipeNotOpen = -14222;
278 const WTErr eIPC_WriteBufferResizeFailed = -14223;
279 const WTErr eIPC_NotConnectedSendMsgFailed = -14224;
280 const WTErr eIPC_OpenWritePipeWorkerStoping = -14225;
281 const WTErr eIPC_SoketSendFailed = -14226;
282 const WTErr eIPC_PtonFailed = -14227;
283 const WTErr eIPC_SocketFailed = -14228;
284 const WTErr eIPC_BindFailed = -14229;
285 const WTErr eIPC_ListenFailed = -14230;
286 const WTErr eIPC_ConnectFailed = -14231;
287 const WTErr eIPC_WsaStartupFailed = -14232;
288 const WTErr eIPC_UdpSocketCreateFailed = -14233;
289 const WTErr eIPC_UdpSocketConnectFailed = -14234;
290 const WTErr eIPC_UdpSocketBinFailed = -14235;
291 const WTErr eIPC_SetBufferPreambleFailed = -14226;
294 const WTErr eDB_BatchRollback = -15501;
296 // inventory related errors
297 const WTErr eUnknown_Device = -16001;
298 const WTErr eInvNoDevice = -16002;
300 // SG protocol service errors
301 const WTErr eSGProtocolService_Not_Running = -17001;
302 const WTErr eSGProtocolService_Version_MisMatch = -17002;
304 // Error code related to Param
305 const WTErr eInvalidParam = -18001;
307 #define WUIsError(theErrorCode) (eNoErr != (theErrorCode))
308 #define WUNoError(theErrorCode) (eNoErr == (theErrorCode))
309 #define WUThrowError(theErrorCode) {if(WUIsError(theErrorCode))throw (theErrorCode);}
310 #define WUThrowErrorIfNil(thePtr , theErrorCode) {if (0 == thePtr )throw (theErrorCode);}
311 #define WUThrowErrorIfFalse(theBool , theErrorCode) {if (!(theBool))throw (theErrorCode);}
312 #define WUThrowErrorCodeIfError(err,theErrorCode) {if(WUIsError(err))throw (theErrorCode);}
314 // Get the error string that match the error code.
315 DllExport const char* WTErrName(WTErr wtErr);
317 #endif //__WUErrors_h__: