Polaris: p-assert.h File Reference

p-assert.h File Reference

Go to the source code of this file.

Enumerations

enum  ABORT_STYLE {
  ABORT_UNDEFINED = 0x00,
  ABORT_THROW = 0x01,
  ABORT_LONGJMP = 0x02,
  ABORT_ABORT = 0x04,
  ABORT_EXIT = 0x08,
  ABORT_DUMP_TRACE = 0x10
}

Functions

void set_abort_style (ABORT_STYLE as)
void _p_abort (const char *file, int line, const char *str) __attribute__((noreturn))
void _p_warning (const char *file, int line, const char *str)
void _p_assert (int assertion, const char *file, int line, const char *str)

Variables

jmp_buf _jump_buf_env
 #include <setjmp.h>


Enumeration Type Documentation

enum ABORT_STYLE
 

Enumeration values:
ABORT_UNDEFINED 
ABORT_THROW  defaults to abort()
ABORT_LONGJMP  throws std::runtime_error
ABORT_ABORT  calls longjmp (hopefully a setjmp has previously been called).
ABORT_EXIT  calls abort()
ABORT_DUMP_TRACE  calls exit()

Definition at line 10 of file p-assert.h.


Function Documentation

void set_abort_style ABORT_STYLE  as  ) 
 

Definition at line 16 of file p-assert.cc.

References _abort_style.

void _p_abort const char *  file,
int  line,
const char *  str
 

... If it gets here, make it abort to save the core.

Definition at line 29 of file p-assert.cc.

References _abort_style, _jump_buf_env, ABORT_ABORT, ABORT_DUMP_TRACE, ABORT_EXIT, ABORT_LONGJMP, ABORT_THROW, line, and stack_dump().

Referenced by _p_assert().

void _p_warning const char *  file,
int  line,
const char *  str
 

Definition at line 63 of file p-assert.cc.

References line.

void _p_assert int  assertion,
const char *  file,
int  line,
const char *  str
 

Definition at line 20 of file p-assert.cc.

References _p_abort(), and line.


Variable Documentation

jmp_buf _jump_buf_env
 

#include <setjmp.h>

Definition at line 12 of file p-assert.cc.

 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:24 2005