OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
errormanager.c File Reference

Source file providing a simple interface for managing SWMM output API runtime error messages. More...

#include <string.h>
#include <stdlib.h>
#include "errormanager.h"
Include dependency graph for errormanager.c:

Functions

error_handle_t * new_error_manager (p_msg_lookup message_lookup)
 Allocate a zero-status error manager and retain its lookup callback.
 
void dst_error_manager (error_handle_t *error_handle)
 Release an error manager allocation.
 
int set_error (error_handle_t *error_handle, int errorcode)
 Record a nonzero error without clearing a previous status on success.
 
char * check_error (error_handle_t *error_handle)
 Allocate a copy of the current stored error message.
 
void clear_error (error_handle_t *error_handle)
 Explicitly clear the sticky error status.
 

Detailed Description

Source file providing a simple interface for managing SWMM output API runtime error messages.

Author
Michael E. Tryby (US EPA - ORD/NRMRL)
Date
Created: 2017-08-25
Last edited: 2024-10-17
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
License
Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.

Function Documentation

◆ check_error()

char * check_error ( error_handle_t * error_handle)

Allocate a copy of the current stored error message.

See also
Declaration contract for check_error().

◆ clear_error()

void clear_error ( error_handle_t * error_handle)

Explicitly clear the sticky error status.

See also
Declaration contract for clear_error().

◆ dst_error_manager()

void dst_error_manager ( error_handle_t * error_handle)

Release an error manager allocation.

See also
Declaration contract for dst_error_manager().

◆ new_error_manager()

error_handle_t * new_error_manager ( p_msg_lookup message_lookup)

Allocate a zero-status error manager and retain its lookup callback.

See also
Declaration contract for new_error_manager().

◆ set_error()

int set_error ( error_handle_t * error_handle,
int errorcode )

Record a nonzero error without clearing a previous status on success.

See also
Declaration contract for set_error().