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

#include <rawaccel-userspace.hpp>
#include <rawaccel-io.hpp>

namespace ra = rawaccel;

int main(int argc, char** argv) {
	try {
		ra::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;
	}
}