move RelpipeCLIException.h from relpipe-in-cli to relpipe-lib-cli v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 13 Aug 2018 20:38:41 +0200
branchv_0
changeset 3 88e1bb50d00c
parent 2 117e4145fff8
child 4 efe39602b34b
move RelpipeCLIException.h from relpipe-in-cli to relpipe-lib-cli
include/relpipe/cli/RelpipeCLIException.h
nbproject/configurations.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/relpipe/cli/RelpipeCLIException.h	Mon Aug 13 20:38:41 2018 +0200
@@ -0,0 +1,36 @@
+#pragma once
+
+#include <string>
+
+#include <relpipe/cli/CLI.h>
+
+using namespace std;
+
+namespace relpipe {
+namespace cli {
+
+/**
+ * TODO: move to relpipe-lib-cli (a common header-only library)
+ */
+class RelpipeCLIException {
+private:
+	wstring message;
+	int exitCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
+public:
+
+	RelpipeCLIException(wstring message, int exitCode) :
+	message(message), exitCode(exitCode) {
+	}
+
+	wstring getMessge() {
+		return message;
+	}
+
+	int getExitCode() {
+		return exitCode;
+	}
+
+};
+
+}
+}
\ No newline at end of file
--- a/nbproject/configurations.xml	Sun Aug 12 13:00:24 2018 +0200
+++ b/nbproject/configurations.xml	Mon Aug 13 20:38:41 2018 +0200
@@ -5,6 +5,7 @@
                    displayName="Header Files"
                    projectFiles="true">
       <itemPath>include/relpipe/cli/CLI.h</itemPath>
+      <itemPath>include/relpipe/cli/RelpipeCLIException.h</itemPath>
     </logicalFolder>
     <logicalFolder name="ResourceFiles"
                    displayName="Resource Files"
@@ -41,6 +42,11 @@
       </item>
       <item path="include/relpipe/cli/CLI.h" ex="false" tool="3" flavor2="0">
       </item>
+      <item path="include/relpipe/cli/RelpipeCLIException.h"
+            ex="false"
+            tool="3"
+            flavor2="0">
+      </item>
     </conf>
     <conf name="Release" type="2">
       <toolsSet>
@@ -66,6 +72,11 @@
       </item>
       <item path="include/relpipe/cli/CLI.h" ex="false" tool="3" flavor2="0">
       </item>
+      <item path="include/relpipe/cli/RelpipeCLIException.h"
+            ex="false"
+            tool="3"
+            flavor2="0">
+      </item>
     </conf>
   </confs>
 </configurationDescriptor>