Files
BPI-CM9-Linux/aml-comp/vendor/amlogic/linux_sample_app/aml-qt-camera/main.cpp
T

30 lines
842 B
C++
Raw Normal View History

2026-08-13 11:28:40 +08:00
#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;
}
}