File: Assert.cc

package info (click to toggle)
proda 1.0-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 584 kB
  • sloc: cpp: 8,549; xml: 163; makefile: 109; sh: 12
file content (19 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//////////////////////////////////////////////////////////////////////
// Assert.cc
//////////////////////////////////////////////////////////////////////

#include <stdio.h>
#include <stdlib.h>
#include "Assert.h"

//////////////////////////////////////////////////////////////////////
// Write out assertion error message
//////////////////////////////////////////////////////////////////////

int _ASSERT_FAILED (const char *filename, int line_number, const char *error_msg){
  fprintf (stderr, "Assertion failed in file \"%s\", line %d: %s\n",
	   filename, line_number, error_msg);
  abort();
  return 0;
}