include/relpipe/cli/RelpipeCLIException.h
branchv_0
changeset 3 88e1bb50d00c
child 6 114521cca04a
equal deleted inserted replaced
2:117e4145fff8 3:88e1bb50d00c
       
     1 #pragma once
       
     2 
       
     3 #include <string>
       
     4 
       
     5 #include <relpipe/cli/CLI.h>
       
     6 
       
     7 using namespace std;
       
     8 
       
     9 namespace relpipe {
       
    10 namespace cli {
       
    11 
       
    12 /**
       
    13  * TODO: move to relpipe-lib-cli (a common header-only library)
       
    14  */
       
    15 class RelpipeCLIException {
       
    16 private:
       
    17 	wstring message;
       
    18 	int exitCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
       
    19 public:
       
    20 
       
    21 	RelpipeCLIException(wstring message, int exitCode) :
       
    22 	message(message), exitCode(exitCode) {
       
    23 	}
       
    24 
       
    25 	wstring getMessge() {
       
    26 		return message;
       
    27 	}
       
    28 
       
    29 	int getExitCode() {
       
    30 		return exitCode;
       
    31 	}
       
    32 
       
    33 };
       
    34 
       
    35 }
       
    36 }