16#ifndef COOK_EXCEPTION_H
17#define COOK_EXCEPTION_H
80 const char*
getFile ()
const {
return m_file; }
98#define COOKMEM_ASSERT(b) do { if (!(b)) throw cookmem::Exception (cookmem::MEM_ERROR_ASSERT, "assertion failure.", __FILE__, __LINE__); } while (0)
100#define COOKMEM_ASSERT(b)
Definition exception.h:39
MemError_et getError() const
Definition exception.h:66
const char * getMessage() const
Definition exception.h:73
const char * getFile() const
Definition exception.h:80
int getLine() const
Definition exception.h:87
Exception(MemError_et error, const char *msg, const char *file=nullptr, int line=0)
Definition exception.h:53
Definition allocator.h:39
Definition allocator.h:29
MemError_et
Definition exception.h:28
@ MEM_ERROR_PADDING
padding bytes after an allocation were overwritten
Definition exception.h:32
@ MEM_ERROR_GENERAL
general error
Definition exception.h:29
@ MEM_ERROR_DOUBLE_FREE
freeing an already free pointer
Definition exception.h:31
@ MEM_ERROR_ASSERT
assertion failure (COOKMEM_DEBUG builds only)
Definition exception.h:30