Skip to content

Commit ac77eaf

Browse files
ViacheslavRbigcbot
authored andcommitted
Replacing abort with runtime error
The change replaces invocation of std::abort() function with a throw of std::runtime_error in CIF interface.
1 parent 679a12a commit ac77eaf

File tree

1 file changed

+5
-0
lines changed
  • IGC/AdaptorOCL/cif/cif/helpers

1 file changed

+5
-0
lines changed

IGC/AdaptorOCL/cif/cif/helpers/error.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ SPDX-License-Identifier: MIT
99
#pragma once
1010

1111
#include <cstdlib>
12+
#include <stdexcept>
1213

1314
namespace CIF {
1415

1516
inline void AbortImpl(){
17+
#if defined(NDEBUG)
18+
throw std::runtime_error("Internal Error.");
19+
#else
1620
std::abort();
21+
#endif
1722
}
1823

1924
template<typename T = void>

0 commit comments

Comments
 (0)