~ubuntu-branches/ubuntu/trusty/cclive/trusty-proposed

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alejandro Garrido Mota
  • Date: 2011-03-07 14:37:59 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110307143759-abieei4gsctde1zo
Tags: 0.7.3.1-1
* New upstream release (Closes: #608393, #588795) 
* Remove patch: The changes was included by upstream author.
* Remove two white lines in d/rules 
* d/copyright: Update Copyright years to 2009,2011 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* Copyright (C) 2010  Toni Gundogdu <legatvs@gmail.com>
 
3
*
 
4
* This program is free software: you can redistribute it and/or modify
 
5
* it under the terms of the GNU General Public License as published by
 
6
* the Free Software Foundation, either version 3 of the License, or
 
7
* (at your option) any later version.
 
8
*
 
9
* This program is distributed in the hope that it will be useful,
 
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
* GNU General Public License for more details.
 
13
*
 
14
* You should have received a copy of the GNU General Public License
 
15
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
*/
 
17
 
 
18
#include <iostream>
 
19
 
 
20
#include "cclive/application.h"
 
21
 
 
22
int
 
23
main (int argc, char *argv[])
 
24
{
 
25
 
 
26
  cclive::application app;
 
27
  int rc = 0; // OK.
 
28
 
 
29
  try
 
30
    {
 
31
      rc = app.exec(argc,argv);
 
32
    }
 
33
 
 
34
  // Thrown by quvicpp::query constructor (e.g. quvi_init failure).
 
35
  catch (const quvicpp::error& e)
 
36
    {
 
37
      std::clog << "libquvi: error: " << e.what() << std::endl;
 
38
    }
 
39
 
 
40
  // Thrown by boost (e.g. cclive::go_background failure).
 
41
  catch (const std::runtime_error& e)
 
42
    {
 
43
      std::clog << "error: " << e.what() << std::endl;
 
44
    }
 
45
 
 
46
  return rc;
 
47
}
 
48
 
 
49
// vim: set ts=2 sw=2 tw=72 expandtab: