Coverage for encodermap/misc/errors.py: 100%
8 statements
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-07 11:05 +0000
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-07 11:05 +0000
1# -*- coding: utf-8 -*-
2# encodermap/misc/errors.py
3################################################################################
4# Encodermap: A python library for dimensionality reduction.
5#
6# Copyright 2019-2022 University of Konstanz and the Authors
7#
8# Authors:
9# Kevin Sawade, Tobias Lemke
10#
11# Encodermap is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License as
13# published by the Free Software Foundation, either version 2.1
14# of the License, or (at your option) any later version.
15# This package is distributed in the hope that it will be useful to other
16# researches. IT DOES NOT COME WITH ANY WARRANTY WHATSOEVER; without even the
17# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18# See the GNU Lesser General Public License for more details.
19#
20# See <http://www.gnu.org/licenses/>.
21################################################################################
23__all__ = ["BadError"]
25##############################################################################
26# Errors
27##############################################################################
30class Error(Exception):
31 """Base class for exceptions in this module."""
33 pass
36class BadError(Error):
37 """Raised when the Error is really bad."""
39 def __init__(self, message):
40 self.message = "VERY BAD ERROR: " + message
41 super().__init__(self.message)
44class NotImplementedError(Error):
45 """Raised when I know, that there is a section missing,
46 but I am too lazy to code that in."""
48 pass