aboutsummaryrefslogtreecommitdiff
path: root/compiler/error.c
blob: 7d70f608838633a42f132aca0ee1ab3209fc687b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "error.h"

#include <stdio.h>
#include <stdlib.h>

void error(int code, char* message) {
	if (message) {
		fprintf(stderr, "%s\n", message);
	}

	exit(code);
}

void error_no_mem(void) {
	error(ERROR_NO_MEMORY, "No memory");
}