smesh/src/Tools/blocFissure/gmu/fissError.py

18 lines
334 B
Python
Raw Normal View History

# -*- 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))