RelpipeCLIException.h
author František Kučera <franta-hg@frantovo.cz>
Thu, 09 Aug 2018 22:58:38 +0200
branchv_0
changeset 18 9e543fd0254c
parent 14 cfed80d11caa
child 19 22f493401ac0
permissions -rw-r--r--
StdInCommand(false) should work same as ArgumentsCommand()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#pragma once
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
#include <string>
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
#include "CLI.h"
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
using namespace std;
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
namespace relpipe {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
namespace cli {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
/**
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 * TODO: move to relpipe-lib-cli (a common header-only library)
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 */
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
class RelpipeCLIException {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
private:
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
	wstring message;
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
	int exitCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
public:
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	RelpipeCLIException(wstring message, int exitCode) :
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
	message(message), exitCode(exitCode) {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
	}
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
	wstring getMessge() {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
		return message;
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
	}
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
	int getExitCode() {
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
		return exitCode;
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	}
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
};
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
}
cfed80d11caa introduce and use RelpipeCLIException
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
}