Grid Community Toolkit
6.2.1705709074 (tag: v6.2.20240202)
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
gridftp
hdfs
src
gridftp_hdfs_error.h
1
2
// Messages should not end with newline
3
#define MESSAGE_BUFFER_SIZE 1024
4
5
#define SomeError(hdfs_handle, msg) \
6
char * formatted_msg = (char *)globus_malloc(MESSAGE_BUFFER_SIZE); \
7
char * user = hdfs_handle ? hdfs_handle->username : NULL; \
8
char * path = hdfs_handle ? hdfs_handle->pathname : NULL; \
9
char * host = hdfs_handle ? hdfs_handle->local_host : NULL; \
10
snprintf(formatted_msg, MESSAGE_BUFFER_SIZE, "%s (host=%s, user=%s, path=%s)", msg, host, user, path); \
11
globus_gfs_log_message(GLOBUS_GFS_LOG_ERR, "%s\n", formatted_msg);
12
13
14
#define GenericError(hdfs_handle, msg, rc) \
15
SomeError(hdfs_handle, msg) \
16
rc = GlobusGFSErrorGeneric(formatted_msg); \
17
globus_free(formatted_msg);
18
19
20
#define SystemError(hdfs_handle, msg, rc) \
21
SomeError(hdfs_handle, msg) \
22
rc = GlobusGFSErrorSystemError(formatted_msg, errno); \
23
globus_free(formatted_msg);
24
25
26
#define MemoryError(hdfs_handle, msg, rc) \
27
SomeError(hdfs_handle, msg) \
28
rc = GlobusGFSErrorMemory(formatted_msg); \
29
globus_free(formatted_msg);
30
Generated by
1.8.5