RelpipeCLIException.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 28 Jul 2018 15:42:42 +0200
branchv_0
changeset 15 dc2121dec856
parent 14 cfed80d11caa
child 19 22f493401ac0
permissions -rw-r--r--
ASan: add AddressSanitizer g++ option: -fsanitize=address

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

};

}
}