aboutsummaryrefslogtreecommitdiff
path: root/backend/Exception.cpp
blob: bb7b7c4df1705e6c0d275ce932ffbb52b2302e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "backend/String.h"

#include "Exception.h"

using namespace std;

const char * Exception::what() {
	return this->error.c_str();
}

Exception::Exception(const char * fmt, ...) {
	va_list args;
	va_start(args, fmt);
	this->error = String::va_fmt(args, fmt);
	va_end(args);
}