mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-07-05 18:51:53 +00:00
Handle assertions as runtime errors
This commit is contained in:
@ -1,5 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ASSERT
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#define ASSERT( exp ) if(!(exp)) throw std::runtime_error("Assertion failed: " STRINGIFY(exp))
|
||||
|
||||
#ifdef NT_ASSERT
|
||||
#undef NT_ASSERT
|
||||
#endif
|
||||
|
||||
#define NT_ASSERT( exp ) ASSERT( exp )
|
||||
|
||||
namespace std
|
||||
{
|
||||
class exception
|
||||
|
Reference in New Issue
Block a user