GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
error.c File Reference
#include <string.h>
Include dependency graph for datetime/error.c:

Go to the source code of this file.

Functions

int datetime_error (int code, char *msg)
 record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set msg=NULL) returns 'code' so that it can be used like:
 
int datetime_error_code (void)
 returns an error code
 
char * datetime_error_msg (void)
 returns an error message
 
void datetime_clear_error (void)
 clears error code and message
 

Function Documentation

◆ datetime_clear_error()

void datetime_clear_error ( void )

clears error code and message

Returns
void

Definition at line 72 of file datetime/error.c.

◆ datetime_error()

int datetime_error ( int code,
char * msg )

record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set msg=NULL) returns 'code' so that it can be used like:

return datetime_error (-1, "bad date");
int datetime_error(int code, char *msg)
record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set ...
Parameters
code
msg
Returns
int

Definition at line 28 of file datetime/error.c.

Referenced by datetime_change_timezone(), datetime_check_day(), datetime_check_fracsec(), datetime_check_hour(), datetime_check_increment(), datetime_check_minute(), datetime_check_month(), datetime_check_second(), datetime_check_timezone(), datetime_check_type(), datetime_check_year(), datetime_days_in_month(), datetime_days_in_year(), datetime_difference(), datetime_is_leap_year(), and datetime_scan().

◆ datetime_error_code()

int datetime_error_code ( void )

returns an error code

Returns
int

Definition at line 46 of file datetime/error.c.

Referenced by datetime_format(), datetime_get_increment_type(), datetime_increment(), and datetime_set_increment_type().

◆ datetime_error_msg()

char * datetime_error_msg ( void )

returns an error message

Returns
char *

Definition at line 59 of file datetime/error.c.