aboutsummaryrefslogtreecommitdiffstats
path: root/src/err/errstr.c
blob: 075b2854e23677d3fdadcb19a19251a3ac23b0ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) 2023 Marc Pervaz Boocha
 *
 * SPDX-License-Identifier: MIT
 */

#include <err.h>

char* calt_errstr(enum calt_err err){
	switch (err) {
		case CALT_OK:
			return "No Error";
		case CALT_ERR_NULL:
			return "Null Pointer";
		case CALT_ERR_OOM:
			return "Unable to Allocate Memmory(Out of Memmory)";
		case CALT_ERR_OP_NOT_IMPLEMENTED:
			return "Operation has not been implemented";
		case CALT_ERR_INVALID_ARGUEMENT:
			return "Invalid Arguement";
		case CALT_ERR_UNKNOWN:
		default:
			return "Unknown Error";
	}
}