RelpipeCLIException.h
branchv_0
changeset 14 cfed80d11caa
child 19 22f493401ac0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RelpipeCLIException.h	Sat Jul 28 15:11:07 2018 +0200
@@ -0,0 +1,36 @@
+#pragma once
+
+#include <string>
+
+#include "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