1# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
2# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
3#
4# MDAnalysis --- https://www.mdanalysis.org
5# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
6# (see the file AUTHORS for the full list of names)
7#
8# Released under the GNU Public Licence, v2 or any higher version
9#
10# Please cite your use of MDAnalysis in published work:
11#
12# R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler,
13# D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein.
14# MDAnalysis: A Python package for the rapid analysis of molecular dynamics
15# simulations. In S. Benthall and S. Rostrup editors, Proceedings of the 15th
16# Python in Science Conference, pages 102-109, Austin, TX, 2016. SciPy.
17#
18# N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein.
19# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
20# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
21#
22
23"""
24Custom exceptions and warnings --- :mod:`MDAnalysis.exceptions`
25===============================================================
26
27"""
28
29class SelectionError(Exception):
30    """Raised when a atom selection failed."""
31
32
33class FinishTimeException(Exception):
34    """For Issue 188."""
35
36
37class NoDataError(ValueError):
38    """Raised when empty input is not allowed or required data are missing."""
39
40
41class ApplicationError(OSError):
42    """Raised when an external application failed.
43
44    The error code is specific for the application.
45
46    .. versionadded:: 0.7.7
47    """
48
49
50class SelectionWarning(Warning):
51    """Warning indicating a possible problem with a selection."""
52
53
54class MissingDataWarning(Warning):
55    """Warning indicating is that required data are missing."""
56
57
58class ConversionWarning(Warning):
59    """Warning indicating a problem with converting between units."""
60
61
62class FileFormatWarning(Warning):
63    """Warning indicating possible problems with a file format."""
64
65
66class StreamWarning(Warning):
67    """Warning indicating a possible problem with a stream.
68
69    :exc:`StreamWarning` is used when streams are substituted for simple access
70    by filename (see in particular
71    :class:`~MDAnalysis.lib.util.NamedStream`). This does not work everywhere
72    in MDAnalysis (yet).
73    """
74
75
76class DuplicateWarning(UserWarning):
77    """Warning indicating possible problems arising from an
78    :class:`~MDAnalysis.core.groups.AtomGroup` /
79    :class:`~MDAnalysis.core.groups.ResidueGroup` /
80    :class:`~MDAnalysis.core.groups.SegmentGroup` containing duplicate
81    :class:`Atoms<MDAnalysis.core.groups.Atom>` /
82    :class:`Residues<MDAnalysis.core.groups.Residue>` /
83    :class:`Segments<MDAnalysis.core.groups.Segment>`.
84
85
86    .. versionadded:: 0.19.0
87    """
88