RelpipeCLIException.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 29 Jul 2018 14:42:50 +0200
branchv_0
changeset 17 f543468a7e49
parent 14 cfed80d11caa
child 19 22f493401ac0
permissions -rw-r--r--
StdInCommand: throw exception if required value is missing

#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;
	}

};

}
}