view src/main.cpp @ 5:d691ce98f406

OK. This is the first release. Honest.
author Eris Caffee <discordia@eldalin.com>
date Fri, 12 Nov 2010 23:58:48 -0600
parents 455406f5f021
children
line source
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Fracter - A simple Mandelbrot Set viewer.
4 //
5 // Copyright (C) 2010 Sarah Eris Horsley Caffee
6 //
7 // This file is part of Fracter.
8 //
9 // Fracter is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //
22 // main.cpp
23 //
24 ////////////////////////////////////////////////////////////////////////////////
26 #include <exception>
27 #include <iostream>
29 #include "App.h"
31 ////////////////////////////////////////////////////////////////////////////////
33 int main (int argc, char* argv[])
34 {
35 int retval = 0;
37 std::cout << "Copyright (C) 2010 Sarah Eris Horsley Caffee" << std::endl
38 << "This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. It is licensed under the GNU GPL v3. For details see the COPYING file that you should have received along with this program, or see http://www.gnu.org/licenses/gpl-3.0.html" << std::endl << std::endl;;
40 try
41 {
42 App the_app;
43 retval = the_app.run();
44 }
45 catch (const std::exception & error)
46 {
47 std::string e = "An unanticipated error has occurred. Please contacct the developers and report the following information:\nCaught exception: ";
48 e += error.what();
49 std::cerr << e << std::endl;
50 retval = 1;
51 }
53 return retval;;
54 }