1###############################################################################
2# Copyright (c) 2013 INRIA
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 version 2 as
6# published by the Free Software Foundation;
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16#
17# Authors: Daniel Camara  <daniel.camara@inria.fr>
18#          Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19###############################################################################
20'''
21 Exeptions.py
22
23 This file stores the Exceptions raised by Bake.
24'''
25
26class TaskError(Exception):
27    """ Error found during the execution of the required options. """
28
29    def __init__(self, reason = ''):
30        self._reason = reason
31        return
32    @property
33    def reason(self):
34        return self._reason
35
36class MetadataError(Exception):
37    """ Error reading the configuration. """
38
39    def __init__(self, reason = ''):
40        self._reason = reason
41        return
42    def reason(self):
43        return self._reason
44
45class NotImplemented(Exception):
46    """ A not yet implemented option was met. """
47
48    def __init__(self):
49        pass
50