summaryrefslogtreecommitdiff
path: root/console/console.cpp
blob: 549cb683021aeb5491215c863c7034df053df3a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

#define NOMINMAX
#include <Windows.h>

#include <rawaccel-userspace.hpp>
#include "console_write.hpp"

int main(int argc, char** argv) {
	try {
		write(ra::parse(argc, argv));
	}
	catch (std::domain_error e) {
		std::cerr << e.what() << '\n';
		return ra::INVALID_ARGUMENT;
	}
	catch (std::system_error e) {
		std::cerr << "Error: " << e.what() << " (" << e.code() << ")\n";
		return ra::SYSTEM_ERROR;
	}
}