src/relpipe-in-xml.cpp
branchv_0
changeset 2 3ab78bf63467
parent 0 751260846c40
child 4 1363ec0879ca
equal deleted inserted replaced
1:9aed8c2ea97d 2:3ab78bf63467
    44 
    44 
    45 	try {
    45 	try {
    46 		XMLCommand command;
    46 		XMLCommand command;
    47 		command.process(cin, cout);
    47 		command.process(cin, cout);
    48 		resultCode = CLI::EXIT_CODE_SUCCESS;
    48 		resultCode = CLI::EXIT_CODE_SUCCESS;
    49 	} catch (RelpipeWriterException e) {
    49 	} catch (RelpipeWriterException& e) {
    50 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    50 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    51 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    51 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    52 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
    52 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
       
    53 	} catch (const xercesc::XMLException& e) {
       
    54 		// TODO: print message
       
    55 		// char* message = xercesc::XMLString::transcode(e.getMessage());
       
    56 		fwprintf(stderr, L"Caught xercesc::XMLException\n");
       
    57 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
       
    58 		resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
    53 	}
    59 	}
    54 
    60 
    55 	return resultCode;
    61 	return resultCode;
    56 }
    62 }