summaryrefslogtreecommitdiff
path: root/modules/CIAO/tools/Config_Handlers/Common.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/tools/Config_Handlers/Common.h')
-rw-r--r--modules/CIAO/tools/Config_Handlers/Common.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/CIAO/tools/Config_Handlers/Common.h b/modules/CIAO/tools/Config_Handlers/Common.h
new file mode 100644
index 00000000000..dec8f4b497a
--- /dev/null
+++ b/modules/CIAO/tools/Config_Handlers/Common.h
@@ -0,0 +1,46 @@
+// $Id$
+/**
+ * @file Common.h
+ * @author Will Otte <wotte@dre.vanderbilt.edu>
+ *
+ * Some common definitions for all config_handlers.
+ */
+#ifndef CONFIG_HANDLERS_COMMON_H
+#define CONFIG_HANDLERS_COMMON_H
+#include <string>
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+ /**
+ * @class Config_Error
+ * @brief Exception to communicate a config_handlers error
+ */
+ class Config_Error
+ {
+ public:
+ Config_Error (const std::basic_string<ACE_TCHAR> &name,
+ const std::basic_string<ACE_TCHAR> &error) :
+ name_ (name),
+ error_ (error)
+ {};
+
+ void add_name (const std::basic_string<ACE_TCHAR> &name)
+ {
+ name_ = name + ACE_TEXT (":") + name_;
+ }
+
+ /// Some identifying information about the element that
+ /// caused the error
+ std::basic_string<ACE_TCHAR> name_;
+
+ /// A human readable error message
+ std::basic_string<ACE_TCHAR> error_;
+
+ };
+ }
+}
+#endif /* CONFIG_HANDLERS_COMMON_H */
+
+