Salome HOME
general crack dialog, user message mecanism for some errors
[modules/smesh.git] / src / Tools / blocFissure / gmu / fissError.py
diff --git a/src/Tools/blocFissure/gmu/fissError.py b/src/Tools/blocFissure/gmu/fissError.py
new file mode 100644 (file)
index 0000000..74b0587
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+
+class fissError(Exception):
+  """
+  usage:
+  try:
+    instructions()
+  except:
+    raise fissError(traceback.extract_stack(),"mon message")  
+  """
+  def __init__(self, pile, msg):
+    self.pile = pile    
+    self.msg = msg
+
+  def __str__(self):
+    return 'msg=%s\npile=%s\n'%(self.msg, repr(self.pile))
+