From 25d2fa1607a1bf8508ce3458bde7995366683805 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Thu, 18 Jun 2015 10:38:27 +0200 Subject: [PATCH] single chunk test: catch only cl::Error --- libethash-cl/ethash_cl_miner.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index 2fc6102fb..c5f77045b 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -334,8 +334,11 @@ bool ethash_cl_miner::init( m_dagChunks.push_back(cl::Buffer(m_context, CL_MEM_READ_ONLY, _dagSize)); ETHCL_LOG("Created one big buffer for the DAG"); } - catch (...) + catch (cl::Error err) { + int errCode = err.err(); + if (errCode != CL_INVALID_BUFFER_SIZE || errCode != CL_MEM_OBJECT_ALLOCATION_FAILURE) + ETHCL_LOG("Allocating single buffer failed with: " << err.what() << "(" << errCode << ")"); cl_ulong result; device.getInfo(CL_DEVICE_MAX_MEM_ALLOC_SIZE, &result); ETHCL_LOG(