OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
errormanager.h
Go to the documentation of this file.
1
13
14#ifndef ERRORMANAGER_H_
15#define ERRORMANAGER_H_
16
18#define ERR_MAXMSG 256
19
26 ERR411 = 411,
28 ERR421 = 421,
30 ERR422 = 422,
32 ERR423 = 423,
34 ERR424 = 424,
36 ERR434 = 434,
38 ERR435 = 435,
40 ERR436 = 436,
42 ERR440 = 440,
43};
44
51 WARN10 = 10,
52};
53
65typedef void (*p_msg_lookup)(int errorcode, char* message, int length);
66
87
97
107void dst_error_manager(error_handle_t* error_handle);
108
117int set_error(error_handle_t* error_handle, int errorcode);
118
130char* check_error(error_handle_t* error_handle);
131
138void clear_error(error_handle_t* error_handle);
139
140#endif /* ERRORMANAGER_H_ */
struct error_s error_handle_t
int set_error(error_handle_t *error_handle, int errorcode)
Record a nonzero error without clearing a previous status on success.
Definition errormanager.c:40
OutputWarningTypes
Warning codes.
Definition errormanager.h:49
@ WARN10
Model run issued warnings.
Definition errormanager.h:51
void dst_error_manager(error_handle_t *error_handle)
Release an error manager allocation.
Definition errormanager.c:33
error_handle_t * new_error_manager(p_msg_lookup message_lookup)
Allocate a zero-status error manager and retain its lookup callback.
Definition errormanager.c:21
void clear_error(error_handle_t *error_handle)
Explicitly clear the sticky error status.
Definition errormanager.c:67
void(* p_msg_lookup)(int errorcode, char *message, int length)
Describe a borrowed lookup callback used to format one error code.
Definition errormanager.h:65
char * check_error(error_handle_t *error_handle)
Allocate a copy of the current stored error message.
Definition errormanager.c:52
OutputErrorTypes
Error codes.
Definition errormanager.h:24
@ ERR424
Error 424: no memory allocated for results.
Definition errormanager.h:34
@ ERR411
Error 411: memory allocation failure.
Definition errormanager.h:26
@ ERR440
rror 440: an unspecified error has occurred
Definition errormanager.h:42
@ ERR434
Error 434: unable to open binary output file.
Definition errormanager.h:36
@ ERR422
Error 422: reporting period index out of range.
Definition errormanager.h:30
@ ERR436
Error 436: invalid file - contains no results.
Definition errormanager.h:40
@ ERR423
Error 423: element index out of range.
Definition errormanager.h:32
@ ERR435
Error 435: invalid file - not created by SWMM.
Definition errormanager.h:38
@ ERR421
Error 421: invalid parameter code.
Definition errormanager.h:28
Structure for managing errors.
Definition errormanager.h:79
p_msg_lookup message_lookup
Function pointer for error message lookup.
Definition errormanager.h:84
int error_status
Error status code.
Definition errormanager.h:81