forked from coin-or/python-mip
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexceptions.py
49 lines (33 loc) · 1.53 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""Python-MIP Exceptions"""
class MipBaseException(Exception):
"""Base class for all exceptions specific to Python MIP. Only sub-classes
of this exception are raised.
Inherits from the Python builtin ``Exception``."""
class ProgrammingError(MipBaseException):
"""Exception that is raised when the calling program performs an invalid
or nonsensical operation.
Inherits from :attr:`mip.MipBaseException`."""
class InterfacingError(MipBaseException):
"""Exception that is raised when an unknown error occurs while interfacing
with a solver.
Inherits from :attr:`mip.MipBaseException`."""
class InvalidLinExpr(MipBaseException):
"""Exception that is raised when an invalid
linear expression is created.
Inherits from :attr:`mip.MipBaseException`."""
class InvalidParameter(MipBaseException):
"""Exception that is raised when an invalid/non-existent
parameter is used or set.
Inherits from :attr:`mip.MipBaseException`."""
class ParameterNotAvailable(MipBaseException):
"""Exception that is raised when some parameter is not
available or can not be set.
Inherits from :attr:`mip.MipBaseException`."""
class InfeasibleSolution(MipBaseException):
"""Exception that is raised the produced solution
is unfeasible.
Inherits from :attr:`mip.MipBaseException`."""
class SolutionNotAvailable(MipBaseException):
"""Exception that is raised when a method that requires
a solution is queried but the solution is not available.
Inherits from :attr:`mip.MipBaseException`."""