mirror of
https://github.com/robertmartin8/PyPortfolioOpt.git
synced 2022-11-27 18:02:41 +03:00
19 lines
494 B
Python
19 lines
494 B
Python
"""
|
||
The ``exceptions`` module houses custom exceptions. Currently implemented:
|
||
|
||
- OptimizationError
|
||
"""
|
||
|
||
|
||
class OptimizationError(Exception):
|
||
"""
|
||
When an optimization routine fails – usually, this means
|
||
that cvxpy has not returned the "optimal" flag.
|
||
"""
|
||
|
||
def __init__(self, *args, **kwargs):
|
||
default_message = (
|
||
"Please check your objectives/constraints or use a different solver."
|
||
)
|
||
super().__init__(default_message, *args, **kwargs)
|