OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
errormanager.h
Go to the documentation of this file.
1
9#ifndef ERRORMANAGER_H_
10#define ERRORMANAGER_H_
11
13#define ERR_MAXMSG 256
14
21 ERR411 = 411,
23 ERR421 = 421,
25 ERR422 = 422,
27 ERR423 = 423,
29 ERR424 = 424,
31 ERR434 = 434,
33 ERR435 = 435,
35 ERR436 = 436,
37 ERR440 = 440,
38};
39
48
56typedef void (*p_msg_lookup)(int errorcode, char* message, int length);
57
78
79
86
91void dst_error_manager(error_handle_t* error_handle);
92
99int set_error(error_handle_t* error_handle, int errorcode);
100
106char* check_error(error_handle_t* error_handle);
107
112void clear_error(error_handle_t* error_handle);
113
114
115#endif /* ERRORMANAGER_H_ */
struct error_s error_handle_t
int set_error(error_handle_t *error_handle, int errorcode)
Set error code in error manager object.
Definition errormanager.c:37
OutputWarningTypes
Warning codes.
Definition errormanager.h:44
@ WARN10
Model run issued warnings.
Definition errormanager.h:46
void dst_error_manager(error_handle_t *error_handle)
Destroy error manager object.
Definition errormanager.c:29
error_handle_t * new_error_manager(p_msg_lookup message_lookup)
Constructs a new error handle.
Definition errormanager.c:16
void clear_error(error_handle_t *error_handle)
Clear error status.
Definition errormanager.c:66
char * check_error(error_handle_t *error_handle)
Check error status and return error message.
Definition errormanager.c:50
OutputErrorTypes
Error codes.
Definition errormanager.h:19
@ ERR424
Error 424: no memory allocated for results.
Definition errormanager.h:29
@ ERR411
Error 411: memory allocation failure.
Definition errormanager.h:21
@ ERR440
rror 440: an unspecified error has occurred
Definition errormanager.h:37
@ ERR434
Error 434: unable to open binary output file.
Definition errormanager.h:31
@ ERR422
Error 422: reporting period index out of range.
Definition errormanager.h:25
@ ERR436
Error 436: invalid file - contains no results.
Definition errormanager.h:35
@ ERR423
Error 423: element index out of range.
Definition errormanager.h:27
@ ERR435
Error 435: invalid file - not created by SWMM.
Definition errormanager.h:33
@ ERR421
Error 421: invalid parameter code.
Definition errormanager.h:23
void(* p_msg_lookup)(int errorcode, char *message, int length)
Function pointer for error message lookup.
Definition errormanager.h:56
Structure for managing errors.
Definition errormanager.h:70
int error_status
Error status code.
Definition errormanager.h:72
p_msg_lookup message_lookup
Function pointer for error message lookup.
Definition errormanager.h:75