GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
datetime/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: More...
 
int datetime_error_code (void)
 returns an error code More...
 
char * datetime_error_msg (void)
 returns an error message More...
 
void datetime_clear_error (void)
 clears error code and message More...
 

Function Documentation

◆ datetime_clear_error()

void datetime_clear_error ( void  )

clears error code and message

Returns
void

Definition at line 75 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");
Parameters
code
msg
Returns
int

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

Referenced by datetime_change_timezone(), datetime_check_timezone(), datetime_check_type(), datetime_days_in_month(), datetime_days_in_year(), and datetime_is_leap_year().

◆ datetime_error_code()

int datetime_error_code ( void  )

returns an error code

Returns
int

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

Referenced by datetime_format().

◆ datetime_error_msg()

char* datetime_error_msg ( void  )

returns an error message

Returns
char *

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