MoinLight

Annotated moinformat/errors.py

302:9522ce7060da
2021-10-06 Paul Boddie Added useful hgignore definitions.
paul@209 1
#!/usr/bin/env python
paul@209 2
paul@209 3
"""
paul@209 4
Moin wiki processing errors.
paul@209 5
paul@209 6
Copyright (C) 2019 Paul Boddie <paul@boddie.org.uk>
paul@209 7
paul@209 8
This program is free software; you can redistribute it and/or modify it under
paul@209 9
the terms of the GNU General Public License as published by the Free Software
paul@209 10
Foundation; either version 3 of the License, or (at your option) any later
paul@209 11
version.
paul@209 12
paul@209 13
This program is distributed in the hope that it will be useful, but WITHOUT
paul@209 14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
paul@209 15
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
paul@209 16
details.
paul@209 17
paul@209 18
You should have received a copy of the GNU General Public License along with
paul@209 19
this program.  If not, see <http://www.gnu.org/licenses/>.
paul@209 20
"""
paul@209 21
paul@209 22
class ProcessingError(Exception):
paul@209 23
paul@209 24
    "A generic processing error."
paul@209 25
paul@209 26
    def __init__(self, errors):
paul@209 27
        self.errors = errors
paul@209 28
paul@209 29
    def __repr__(self):
paul@209 30
        return "%s(%r)" % (self.__class__.__name__, self.errors)
paul@209 31
paul@209 32
    def __str__(self):
paul@209 33
        return "Error: %s\nMessage: %s\n" % (self.__class__.__name__, self.errors)
paul@209 34
paul@209 35
# vim: tabstop=4 expandtab shiftwidth=4