mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42:55 +00:00
Handle assertions as runtime errors
This commit is contained in:
parent
970c9571b2
commit
1f986d5588
@ -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
|
||||
|
@ -8,6 +8,10 @@
|
||||
#include <ia32.hpp>
|
||||
#pragma warning(pop)
|
||||
|
||||
#define STRINGIFY_(a) #a
|
||||
#define STRINGIFY(a) STRINGIFY_(a)
|
||||
|
||||
#include "stdint.hpp"
|
||||
#include "nt_ext.hpp"
|
||||
#include "new.hpp"
|
||||
#include "exception.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user