Commit e8052758 authored by Daniel Brown's avatar Daniel Brown
Browse files

more error handling

parent baf85301
......@@ -1157,6 +1157,7 @@ class kat(object):
if self.verbose: print ("Finished in " + str(
def remove(self, obj):
if not isinstance(obj, pykat.finesse.Signals) and not ( in self.__components or in self.__detectors or in self.__commands or obj in self.signals.targets):
raise pkex.BasePyKatException("{0} is not currently in the simulation".format(
......@@ -1196,6 +1197,9 @@ class kat(object):
#import gc
#print (gc.get_referrers(obj))
except pkex.BasePyKatException as ex:
pkex.PrintError("Error on removing object:", ex)
def getMatrices(self):
import scipy
......@@ -1277,7 +1281,7 @@ class kat(object):
except pkex.BasePyKatException as ex:
print (ex)
pkex.PrintError("Error on adding object:", ex)
def readOutFile(self, filename):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment