Ssht
1.3.3
Fast and exact spin spherical harmonic transforms
include
ssht
ssht_error.h
Go to the documentation of this file.
1
// SSHT package to perform spin spherical harmonic transforms
2
// Copyright (C) 2011 Jason McEwen
3
// See LICENSE.txt for license details
4
11
#ifndef SSHT_ERROR
12
#define SSHT_ERROR
13
14
#include <stdio.h>
15
#include <stdlib.h>
16
17
#define SSHT_ERROR_GENERIC(comment) \
18
{ \
19
printf("ERROR: %s.\n", comment); \
20
printf( \
21
"ERROR: %s <%s> %s %s %s %d.\n", \
22
"Occurred in function", \
23
__func__, \
24
"of file", \
25
__FILE__, \
26
"on line", \
27
__LINE__); \
28
exit(1); \
29
}
30
31
#define SSHT_ERROR_MEM_ALLOC_CHECK(pointer) \
32
if (pointer == NULL) { \
33
SSHT_ERROR_GENERIC("Memory allocation failed") \
34
}
35
36
#endif
Generated by
1.8.19