Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-core / tags / synfig_0_61_07_rc3 / src / synfig / exception.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file exception.cpp
3 **      \brief Template File
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === H E A D E R S ======================================================= */
24
25 #ifdef USING_PCH
26 #       include "pch.h"
27 #else
28 #ifdef HAVE_CONFIG_H
29 #       include <config.h>
30 #endif
31
32 #include "exception.h"
33 #include "general.h"
34
35 #endif
36
37 /* === U S I N G =========================================================== */
38
39 using namespace std;
40 using namespace etl;
41 using namespace synfig;
42
43 /* === M A C R O S ========================================================= */
44
45 /* === G L O B A L S ======================================================= */
46
47 /* === P R O C E D U R E S ================================================= */
48
49 /* === M E T H O D S ======================================================= */
50
51 Exception::BadLinkName::BadLinkName(const String &what):
52         std::runtime_error(what)
53 //      std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
54 {
55         synfig::error("EXCEPTION: bad link name: "+what);
56 }
57
58 Exception::BadType::BadType(const String &what):
59         std::runtime_error(what)
60 //      std::runtime_error(_("Bad Type")+what.empty()?"":(String(": ")+what))
61 {
62         synfig::error("EXCEPTION: bad type: "+what);
63 }
64
65 Exception::BadFrameRate::BadFrameRate(const String &what):
66         std::runtime_error(what)
67 //      std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
68 {
69         synfig::error("EXCEPTION: bad frame rate: "+what);
70 }
71
72 Exception::BadTime::BadTime(const String &what):
73         std::runtime_error(what)
74 //      std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
75 {
76         synfig::error("EXCEPTION: bad time: "+what);
77 }
78
79 Exception::NotFound::NotFound(const String &what):
80         std::runtime_error(what)
81 //      std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
82 {
83 //      synfig::error("EXCEPTION: not found: "+what);
84 }
85
86 Exception::IDNotFound::IDNotFound(const String &what):
87         NotFound(what)
88 //      std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
89 {
90 //      synfig::error("EXCEPTION: not found: "+what);
91 }
92
93 Exception::FileNotFound::FileNotFound(const String &what):
94         NotFound(what)
95 //      std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
96 {
97         synfig::error("EXCEPTION: file not found: "+what);
98 }
99
100 Exception::IDAlreadyExists::IDAlreadyExists(const String &what):
101         std::runtime_error(what)
102 //      std::runtime_error(_("ID Already Exists")+what.empty()?"":(String(": ")+what))
103 {
104         synfig::error("EXCEPTION: id already exists: "+what);
105 }