MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrExceptions.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrExceptions_H_
10 #define lgrExceptions_H_
11 
12 #include "lgrUtil.h"
13 
14 #include <vlutil/vlFilename.h>
15 #include <vlutil/vlExceptions.h>
16 
17 #define typedefLoggerException(Name,Value) \
18  const int Name##Number = (Value);\
19  typedef DtTemplatedException<Name##Number> Name;
20 
21 namespace MAKLogger
22 {
23 
24  const int LoggerExceptionBase = 40000;
25 
27  typedefLoggerException(DtThreadAlreadyRunning,(ThreadExceptionBase + 1))
28  typedefLoggerException(DtThreadNotStarted, (ThreadExceptionBase + 2))
29  typedefLoggerException(DtThreadCreationError, (ThreadExceptionBase + 3))
30  typedefLoggerException(DtThreadWouldDeadlock, (ThreadExceptionBase + 4))
31 
33  typedefLoggerException(DtInvalidConfigurationFile,(LoggerConfigExceptionBase + 1))
34 
35  const int CommandExceptionBase = LoggerExceptionBase + 20;
36  typedefLoggerException(DtInvalidLgrCommand, (CommandExceptionBase + 1 ))
37  typedefLoggerException(DtUnhandledLgrCommand, (CommandExceptionBase + 2 ))
38  typedefLoggerException(DtCorruptLgrCommand, (CommandExceptionBase + 3 ))
39 
40  const int SystemExceptionBase = LoggerExceptionBase + 30;
41  typedefLoggerException(DtDriverNotAvailable, (SystemExceptionBase + 1))
42 
43  const int EditExceptionBase = LoggerExceptionBase + 40;
44  typedefLoggerException(DtInvalidLoggerState, (EditExceptionBase + 1))
45 
46  const int PluginExceptionBase = LoggerExceptionBase + 50;
47  typedefLoggerException(DtAbstractInterfaceUndefined,(PluginExceptionBase + 1))
48  typedefLoggerException(DtLibraryDoesNotExist, (PluginExceptionBase + 2))
49  typedefLoggerException(DtLibraryFileIsInvalid, (PluginExceptionBase + 3))
50 
51  const int FileExceptionBase = LoggerExceptionBase + 70;
52  typedefLoggerException(DtInvalidLoggerFile, (FileExceptionBase + 1))
53  typedefLoggerException(DtFileOpenError, (FileExceptionBase + 2))
54  typedefLoggerException(DtFileReadError, (FileExceptionBase + 3))
55  typedefLoggerException(DtFileWriteError, (FileExceptionBase + 4))
56  typedefLoggerException(DtUnknownFileVersion, (FileExceptionBase + 5))
57  typedefLoggerException(DtUnableToDeleteFile, (FileExceptionBase + 6))
58  typedefLoggerException(DtUnableToMoveFile, (FileExceptionBase + 7))
59  typedefLoggerException(DtUnableToCopyFile, (FileExceptionBase + 8))
60  typedefLoggerException(DtInvalidPacketType, (FileExceptionBase + 8))
61 
62  const int DataExceptionBase = LoggerExceptionBase + 85;
63  typedefLoggerException(DtSerializeError, (LoggerExceptionBase + 1))
64  typedefLoggerException(DtUnserializeError, (LoggerExceptionBase + 2))
65 
66  const int HLAExceptionBase = LoggerExceptionBase + 100;
67  typedefLoggerException(DtInvalidPacketOperation, (HLAExceptionBase + 1))
68  typedefLoggerException(DtNotHLAProtocol, (HLAExceptionBase + 2))
69  typedefLoggerException(DtInvalidFom, (HLAExceptionBase + 3))
70  typedefLoggerException(DtInvalidExconn, (HLAExceptionBase + 4))
71  typedefLoggerException(DtUnableToCreatePublisher, (HLAExceptionBase + 5))
72  typedefLoggerException(DtInvalidHandle, (HLAExceptionBase + 6))
73 
74 
75  const int GUIExceptionBase = LoggerExceptionBase + 120;
76  typedefLoggerException(DtIncorrectGuiType, (GUIExceptionBase + 1))
77 
80 
84 
85 }
86 
87 #define DtLgrTHROW(exceptionClass,errorMsg) \
88 {\
89  DtFilename tempLocalFile(__FILE__);\
90  tempLocalFile.stripPath();\
91  DtString msg = DtString(#exceptionClass": ") + errorMsg;\
92  throw exceptionClass(msg.c_str(), __DtFUNC__,tempLocalFile.c_str(), __LINE__, 0);\
93 }
94 
95 #define DtCATCH_AND_IGNORE catch(...){}
96 
97 
98 #endif

Document ID: Generated on Tue Aug 1 09:00:26 EDT 2017 from SVN revision 179128
Copyright © 2017 VT MÄK. All Rights Reserved (www.mak.com)