mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Cleanup of error handling
Introduced consistent way of handling errors and printing error messages. Also upgraded some warnings to errors.
This commit is contained in:
parent
4e2bcde010
commit
ad551b363e
6 changed files with 106 additions and 81 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "tio/error.h"
|
||||
|
||||
char * current_time(void)
|
||||
{
|
||||
|
|
@ -33,7 +34,7 @@ char * current_time(void)
|
|||
tmp = localtime(&t);
|
||||
if (tmp == NULL)
|
||||
{
|
||||
printf("Error: Retrieving local time failed\n");
|
||||
error_printf("Retrieving local time failed");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue