https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f79ca12eda537e0b2a79f17c72e8857488968578

commit f79ca12eda537e0b2a79f17c72e8857488968578
Author:     Serge Gautherie <[email protected]>
AuthorDate: Sun Apr 28 12:20:37 2019 +0200
Commit:     Colin Finck <[email protected]>
CommitDate: Sun Apr 28 12:20:37 2019 +0200

    [ROSAUTOTEST] "Enforce" ending '\n' on C___Exception messages (#1533)
---
 modules/rostests/rosautotest/CConfiguration.cpp |  2 +-
 modules/rostests/rosautotest/CPipe.cpp          | 10 +++++-----
 modules/rostests/rosautotest/CWebService.cpp    |  2 +-
 modules/rostests/rosautotest/CWineTest.cpp      |  2 +-
 modules/rostests/rosautotest/main.cpp           |  4 +++-
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/modules/rostests/rosautotest/CConfiguration.cpp 
b/modules/rostests/rosautotest/CConfiguration.cpp
index 2a605b4502..95f95cac55 100644
--- a/modules/rostests/rosautotest/CConfiguration.cpp
+++ b/modules/rostests/rosautotest/CConfiguration.cpp
@@ -27,7 +27,7 @@ CConfiguration::CConfiguration()
 
     /* Check if we are running under ReactOS from the SystemRoot directory */
     if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH))
-        FATAL("GetWindowsDirectoryW failed");
+        FATAL("GetWindowsDirectoryW failed\n");
 
     m_IsReactOS = !_wcsnicmp(&WindowsDirectory[3], L"reactos", 7);
 
diff --git a/modules/rostests/rosautotest/CPipe.cpp 
b/modules/rostests/rosautotest/CPipe.cpp
index 73e9eda295..efff475e93 100644
--- a/modules/rostests/rosautotest/CPipe.cpp
+++ b/modules/rostests/rosautotest/CPipe.cpp
@@ -86,7 +86,7 @@ void
 CPipe::CloseReadPipe()
 {
     if (!m_hReadPipe)
-        FATAL("Trying to close already closed read pipe");
+        FATAL("Trying to close already closed read pipe\n");
     CloseHandle(m_hReadPipe);
     m_hReadPipe = NULL;
 }
@@ -98,7 +98,7 @@ void
 CPipe::CloseWritePipe()
 {
     if (!m_hWritePipe)
-        FATAL("Trying to close already closed write pipe");
+        FATAL("Trying to close already closed write pipe\n");
     CloseHandle(m_hWritePipe);
     m_hWritePipe = NULL;
 }
@@ -129,7 +129,7 @@ bool
 CPipe::Peek(PVOID Buffer, DWORD BufferSize, PDWORD BytesRead, PDWORD 
TotalBytesAvailable)
 {
     if (!m_hReadPipe)
-        FATAL("Trying to peek from a closed read pipe");
+        FATAL("Trying to peek from a closed read pipe\n");
 
     return PeekNamedPipe(m_hReadPipe, Buffer, BufferSize, BytesRead, 
TotalBytesAvailable, NULL);
 }
@@ -161,7 +161,7 @@ CPipe::Read(PVOID Buffer, DWORD NumberOfBytesToRead, PDWORD 
NumberOfBytesRead, D
 {
     if (!m_hReadPipe)
     {
-        FATAL("Trying to read from a closed read pipe");
+        FATAL("Trying to read from a closed read pipe\n");
     }
 
     if (ReadFile(m_hReadPipe, Buffer, NumberOfBytesToRead, NumberOfBytesRead, 
&m_ReadOverlapped))
@@ -232,7 +232,7 @@ bool
 CPipe::Write(LPCVOID Buffer, DWORD NumberOfBytesToWrite, PDWORD 
NumberOfBytesWritten)
 {
     if (!m_hWritePipe)
-        FATAL("Trying to write to a closed write pipe");
+        FATAL("Trying to write to a closed write pipe\n");
 
     return WriteFile(m_hWritePipe, Buffer, NumberOfBytesToWrite, 
NumberOfBytesWritten, NULL);
 }
diff --git a/modules/rostests/rosautotest/CWebService.cpp 
b/modules/rostests/rosautotest/CWebService.cpp
index 850b466117..1a8ae3710d 100644
--- a/modules/rostests/rosautotest/CWebService.cpp
+++ b/modules/rostests/rosautotest/CWebService.cpp
@@ -108,7 +108,7 @@ CWebService::Finish(const char* TestType)
     stringstream ss;
 
     if (!m_TestID)
-        EXCEPTION("CWebService::Finish was called, but not a single result had 
been submitted!");
+        EXCEPTION("CWebService::Finish was called, but not a single result had 
been submitted!\n");
 
     Data = "action=finish";
     Data += Configuration.GetAuthenticationRequestString();
diff --git a/modules/rostests/rosautotest/CWineTest.cpp 
b/modules/rostests/rosautotest/CWineTest.cpp
index 9967d2d21c..d734d2a0a2 100644
--- a/modules/rostests/rosautotest/CWineTest.cpp
+++ b/modules/rostests/rosautotest/CWineTest.cpp
@@ -32,7 +32,7 @@ CWineTest::CWineTest()
     else
     {
         if (!GetWindowsDirectoryW(wszDirectory, MAX_PATH))
-            FATAL("GetWindowsDirectoryW failed");
+            FATAL("GetWindowsDirectoryW failed\n");
 
         m_TestPath = wszDirectory;
         m_TestPath += L"\\bin\\";
diff --git a/modules/rostests/rosautotest/main.cpp 
b/modules/rostests/rosautotest/main.cpp
index 57426ae659..8d6d342da9 100644
--- a/modules/rostests/rosautotest/main.cpp
+++ b/modules/rostests/rosautotest/main.cpp
@@ -89,14 +89,16 @@ wmain(int argc, wchar_t* argv[])
     }
     catch(CSimpleException& e)
     {
+        // e.GetMessage() must include ending '\n'.
         StringOut(e.GetMessage());
     }
     catch(CFatalException& e)
     {
         stringstream ss;
 
+        // e.GetMessage() must include ending '\n'.
         ss << "An exception occured in rosautotest." << endl
-           << "Message: " << e.GetMessage() << endl
+           << "Message: " << e.GetMessage()
            << "File: " << e.GetFile() << endl
            << "Line: " << e.GetLine() << endl
            << "Last Win32 Error: " << GetLastError() << endl;

Reply via email to