1 ###########################################################################
3 # physical_validation, #
4 # a python package to test the physical validity of MD results #
6 # Written by Michael R. Shirts <michael.shirts@colorado.edu> #
7 # Pascal T. Merz <pascal.merz@colorado.edu> #
9 # Copyright (C) 2012 University of Virginia #
10 # (C) 2017 University of Colorado Boulder #
12 # This library is free software; you can redistribute it and/or #
13 # modify it under the terms of the GNU Lesser General Public #
14 # License as published by the Free Software Foundation; either #
15 # version 2.1 of the License, or (at your option) any later version. #
17 # This library is distributed in the hope that it will be useful, #
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
20 # Lesser General Public License for more details. #
22 # You should have received a copy of the GNU Lesser General Public #
23 # License along with this library; if not, write to the #
24 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #
25 # Boston, MA 02110-1301 USA #
27 ###########################################################################
29 Module containing the custom exception classes for the physical_validation
34 class PhysicalValidationError(Exception):
35 r
"""Base class for exceptions in the physical_validation module."""
39 class InputError(PhysicalValidationError
):
40 r
"""Exception raised for input errors"""
42 def __init__(self
, argument
, message
):
47 argument : string or list of strings
50 self
.argument
= argument
51 self
.message
= message
54 class ParserValueNotSetError(PhysicalValidationError
):
56 Exception raised if a requested data value
57 was not set by the user previously
60 def __init__(self
, message
):
67 self
.message
= message
70 class FileFormatError(PhysicalValidationError
):
71 r
"""Exception raised for files not following expected format"""
73 def __init__(self
, argument
, message
):
78 argument : string or list of strings
81 self
.argument
= argument
82 self
.message
= message