<commit_before>/* 
 * Copyright (c) 2013 Opposite Renderer
 * For the full copyright and license information, please view the LICENSE.txt
 * file that was distributed with this source code.
*/

/*
 * This is the render server main entry. The render server accepts connections from clients
 * and will perform rendering per request
 */

#include <iostream>
#include <exception>
#include <QObject>
#include "gui/ServerWindow.hxx"
#include <QApplication>
#include "server/RenderServer.hxx"
//#include <vld.h>

int main( int argc, char** argv )
{
    QApplication app(argc, argv);
    app.setOrganizationName("Opposite Renderer");
    app.setApplicationName("Opposite Renderer");

    RenderServer renderServer;
    ServerWindow serverWindow(NULL, renderServer);
    serverWindow.show();
    int appCode = app.exec();
    renderServer.wait();
    return appCode;
}
<commit_msg>Adds critical error handling for not handled exception in Server<commit_after>/* 
 * Copyright (c) 2013 Opposite Renderer
 * For the full copyright and license information, please view the LICENSE.txt
 * file that was distributed with this source code.
*/

/*
 * This is the render server main entry. The render server accepts connections from clients
 * and will perform rendering per request
 */

#include <iostream>
#include <exception>
#include <QObject>
#include "gui/ServerWindow.hxx"
#include <QApplication>
#include <QMessageBox>
#include "server/RenderServer.hxx"
//#include <vld.h>

int main( int argc, char** argv )
{
    QApplication app(argc, argv);
    app.setOrganizationName("Opposite Renderer");
    app.setApplicationName("Opposite Renderer");

	try {
		RenderServer renderServer;
		ServerWindow serverWindow(NULL, renderServer);
		serverWindow.show();
		int appCode = app.exec();
		renderServer.wait();
		return appCode;
	} catch(std::exception ex){
		QString error = QString("An unexpected error ocurred during execution:\n\t%1\nApplication will now quit.").arg(ex.what());
		QMessageBox::critical(nullptr, "Critical", error);
		return 1;
	}
}

{'fraction_non_alphanumeric': 0.1094747177221404, 'fraction_numerical': 0.004909180166912126, 'mean_word_length': 4.629834254143646, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '178168', 'n_tokens_mistral': 615, 'n_tokens_neox': 581, 'n_words': 198}