Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions control/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,44 @@
#
# $Id$


class ControlSlycot(Exception):
"""Exception for Slycot import. Used when we can't import a function
from the slycot package"""
pass
def __init__(self, error):
print("slycot import failed")
print(error)


class ControlDimension(Exception):
"""Raised when dimensions of system objects are not correct"""
pass


class ControlArgument(Exception):
"""Raised when arguments to a function are not correct"""
pass


class ControlMIMONotImplemented(Exception):
"""Function is not currently implemented for MIMO systems"""
pass


class ControlNotImplemented(Exception):
"""Functionality is not yet implemented"""
pass


# Utility function to see if slycot is installed
def slycot_check():
try:
import slycot
except:
except ImportError as error:
print(error)
return False
except Exception as exception:
print(exception, False)
return False
else:
return True
Loading