src/relpipe-in-filesystem.cpp
branchv_0
changeset 10 3e1608320b6c
parent 4 d44ed75822e7
child 24 4353cd19a6b5
equal deleted inserted replaced
9:b4f29fb16159 10:3e1608320b6c
    26 #include <relpipe/writer/RelpipeWriterException.h>
    26 #include <relpipe/writer/RelpipeWriterException.h>
    27 #include <relpipe/writer/Factory.h>
    27 #include <relpipe/writer/Factory.h>
    28 #include <relpipe/writer/TypeId.h>
    28 #include <relpipe/writer/TypeId.h>
    29 
    29 
    30 #include <relpipe/cli/CLI.h>
    30 #include <relpipe/cli/CLI.h>
       
    31 #include <relpipe/cli/RelpipeCLIException.h>
    31 
    32 
    32 #include "FilesystemCommand.h"
    33 #include "FilesystemCommand.h"
    33 #include "CLIParser.h"
    34 #include "CLIParser.h"
    34 
    35 
    35 using namespace relpipe::cli;
    36 using namespace relpipe::cli;
    51 		resultCode = CLI::EXIT_CODE_SUCCESS;
    52 		resultCode = CLI::EXIT_CODE_SUCCESS;
    52 	} catch (RelpipeWriterException e) {
    53 	} catch (RelpipeWriterException e) {
    53 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    54 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    54 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    55 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    55 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
    56 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
       
    57 	} catch (RelpipeCLIException e) {
       
    58 		fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessge().c_str());
       
    59 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
       
    60 		resultCode = e.getExitCode();
    56 	}
    61 	}
    57 
    62 
    58 	return resultCode;
    63 	return resultCode;
    59 }
    64 }