14#ifndef ERRORMANAGER_H_
15#define ERRORMANAGER_H_
65typedef void (*
p_msg_lookup)(
int errorcode,
char* message,
int length);
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