diff options
author | Bryon Bean <bryon.bean@kitware.com> | 2017-10-23 12:16:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-10 15:19:14 (GMT) |
commit | fcebff75f912f50bdc7fd30f4185141255ba4b1f (patch) | |
tree | 7d5fd4b5c40c4d9bf25e27172443f43332d84b39 /Source/CTest/cmProcess.cxx | |
parent | 3dd2edf4ab94f5044b73b20151592c8e94a5160a (diff) | |
download | CMake-fcebff75f912f50bdc7fd30f4185141255ba4b1f.zip CMake-fcebff75f912f50bdc7fd30f4185141255ba4b1f.tar.gz CMake-fcebff75f912f50bdc7fd30f4185141255ba4b1f.tar.bz2 |
cmProcess: Use explicit enum for process exit exception
Translate the values from KWSys Process.
Diffstat (limited to 'Source/CTest/cmProcess.cxx')
-rw-r--r-- | Source/CTest/cmProcess.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index fac0df9..857f5c1 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -193,9 +193,23 @@ void cmProcess::ResetStartTime() this->StartTime = std::chrono::steady_clock::now(); } -int cmProcess::GetExitException() +cmProcess::Exception cmProcess::GetExitException() { - return cmsysProcess_GetExitException(this->Process); + switch (cmsysProcess_GetExitException(this->Process)) { + case cmsysProcess_Exception_None: + return Exception::None; + case cmsysProcess_Exception_Fault: + return Exception::Fault; + case cmsysProcess_Exception_Illegal: + return Exception::Illegal; + case cmsysProcess_Exception_Interrupt: + return Exception::Interrupt; + case cmsysProcess_Exception_Numerical: + return Exception::Numerical; + default: // case cmsysProcess_Exception_Other: + break; + } + return Exception::Other; } std::string cmProcess::GetExitExceptionString() |