OpenMiner/source/main.cpp

50 lines
988 B
C++
Raw Normal View History

2014-12-15 16:47:30 +01:00
/*
* =====================================================================================
*
* Filename: main.cpp
*
2018-06-05 01:24:54 +02:00
* Description:
2014-12-15 16:47:30 +01:00
*
* Version: 1.0
* Created: 13/12/2014 20:49:00
* Revision: none
* Compiler: gcc
*
* Author: Quentin BAZIN, <quent42340@gmail.com>
2018-06-05 01:24:54 +02:00
* Company:
2014-12-15 16:47:30 +01:00
*
* =====================================================================================
*/
#include <iostream>
#include "Application.hpp"
#include "Exception.hpp"
#include "SDLLoader.hpp"
2014-12-15 16:47:30 +01:00
2018-06-05 01:47:15 +02:00
int main(int, char *[]) {
SDLLoader sdlLoader;
2018-06-05 16:51:58 +02:00
2014-12-15 16:47:30 +01:00
try {
sdlLoader.load();
2018-06-05 01:24:54 +02:00
Application app;
2018-06-05 01:24:54 +02:00
2014-12-15 16:47:30 +01:00
app.run();
}
catch(const Exception &e) {
std::cerr << "Fatal error " << e.what() << std::endl;
2014-12-15 16:47:30 +01:00
return 1;
}
// catch(const std::exception &e) {
// std::cerr << "Exception caught: " << e.what() << std::endl;
// return 1;
// }
// catch(...) {
// std::cerr << "Fatal error: Unknown error." << std::endl;
// return 1;
// }
2018-06-05 01:24:54 +02:00
2014-12-15 16:47:30 +01:00
return 0;
}