Catch dmlc::Error. (#3751)

Fix #3643.
This commit is contained in:
trivialfis
2018-10-04 16:51:38 +13:00
committed by Rory Mitchell
parent efc4f85505
commit c6b5df67f6
2 changed files with 2 additions and 2 deletions

View File

@@ -956,7 +956,7 @@ class SaveCudaContext {
// cudaGetDevice will fail.
try {
safe_cuda(cudaGetDevice(&saved_device_));
} catch (const thrust::system::system_error & err) {
} catch (const dmlc::Error &except) {
saved_device_ = -1;
}
func();