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:51 +0200
branchv_0
changeset 21 1f7b203fceab
parent 20 a18b6964d300
child 22 09a5e21b0a8e
move RelpipeCLIException.h from relpipe-in-cli to relpipe-lib-cli
RelpipeCLIException.h
StdInCommand.h
nbproject/configurations.xml
relpipe-in-cli.cpp
--- a/RelpipeCLIException.h	Mon Aug 13 20:31:09 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#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/StdInCommand.h	Mon Aug 13 20:31:09 2018 +0200
+++ b/StdInCommand.h	Mon Aug 13 20:38:51 2018 +0200
@@ -10,9 +10,9 @@
 
 #include <relpipe/writer/typedefs.h>
 #include <relpipe/cli/CLI.h>
+#include <relpipe/cli/RelpipeCLIException.h>
 
 #include "Command.h"
-#include "RelpipeCLIException.h"
 
 namespace relpipe {
 namespace in {
--- a/nbproject/configurations.xml	Mon Aug 13 20:31:09 2018 +0200
+++ b/nbproject/configurations.xml	Mon Aug 13 20:38:51 2018 +0200
@@ -7,7 +7,6 @@
       <itemPath>ArgumentsCommand.h</itemPath>
       <itemPath>Command.h</itemPath>
       <itemPath>DemoCommand.h</itemPath>
-      <itemPath>RelpipeCLIException.h</itemPath>
       <itemPath>StdInCommand.h</itemPath>
     </logicalFolder>
     <logicalFolder name="ResourceFiles"
@@ -63,8 +62,6 @@
       </item>
       <item path="DemoCommand.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="RelpipeCLIException.h" ex="false" tool="3" flavor2="0">
-      </item>
       <item path="StdInCommand.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="relpipe-in-cli.cpp" ex="false" tool="1" flavor2="0">
@@ -103,8 +100,6 @@
       </item>
       <item path="DemoCommand.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="RelpipeCLIException.h" ex="false" tool="3" flavor2="0">
-      </item>
       <item path="StdInCommand.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="relpipe-in-cli.cpp" ex="false" tool="1" flavor2="0">
--- a/relpipe-in-cli.cpp	Mon Aug 13 20:31:09 2018 +0200
+++ b/relpipe-in-cli.cpp	Mon Aug 13 20:38:51 2018 +0200
@@ -7,8 +7,8 @@
 #include <relpipe/writer/TypeId.h>
 
 #include <relpipe/cli/CLI.h>
+#include <relpipe/cli/RelpipeCLIException.h>
 
-#include "RelpipeCLIException.h"
 #include "Command.h"
 #include "ArgumentsCommand.h"
 #include "DemoCommand.h"