30 lines
842 B
C++
30 lines
842 B
C++
#include "mainwindow.h"
|
|
#include <QApplication>
|
|
#include <iostream>
|
|
#include <exception>
|
|
#include <system_error>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
try {
|
|
QApplication a(argc, argv);
|
|
MainWindow w;
|
|
w.resize(1280, 720);
|
|
w.show();
|
|
|
|
return a.exec();
|
|
} catch (const std::length_error& e) {
|
|
std::cerr << "Caught a length_error: " << e.what() << std::endl;
|
|
return EXIT_FAILURE;
|
|
} catch (const std::system_error& e) {
|
|
std::cerr << "Caught a system_error: " << e.what() << std::endl;
|
|
return EXIT_FAILURE;
|
|
} catch (const std::exception& e) {
|
|
std::cerr << "Caught an exception: " << e.what() << std::endl;
|
|
return EXIT_FAILURE;
|
|
} catch (...) {
|
|
std::cerr << "Caught an unknown exception" << std::endl;
|
|
return EXIT_FAILURE;
|
|
}
|
|
}
|