mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
renaming DeveloperException to HierarchyException. Tweaking MiniLogSentry
This commit is contained in:
parent
30c2f1e871
commit
529736be94
@ -3257,9 +3257,11 @@ class MiniLog:
|
|||||||
class MiniLogSentry:
|
class MiniLogSentry:
|
||||||
def __init__(self, log, funcName, *args, **kw):
|
def __init__(self, log, funcName, *args, **kw):
|
||||||
self.log = log
|
self.log = log
|
||||||
|
if self.log:
|
||||||
self.log.enterFunction(funcName, *args, **kw)
|
self.log.enterFunction(funcName, *args, **kw)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
if self.log:
|
||||||
self.log.exitFunction()
|
self.log.exitFunction()
|
||||||
del self.log
|
del self.log
|
||||||
|
|
||||||
@ -3268,7 +3270,8 @@ def logBlock(id, msg):
|
|||||||
print str(msg)
|
print str(msg)
|
||||||
print '/LOGBLOCK(%03d) >>' % id
|
print '/LOGBLOCK(%03d) >>' % id
|
||||||
|
|
||||||
class DeveloperException(Exception):
|
class HierarchyException(Exception):
|
||||||
|
JOSWILSO = 0
|
||||||
def __init__(self, owner, description):
|
def __init__(self, owner, description):
|
||||||
self.owner = owner
|
self.owner = owner
|
||||||
self.desc = description
|
self.desc = description
|
||||||
@ -3277,7 +3280,7 @@ class DeveloperException(Exception):
|
|||||||
return '(%s): %s' % (self.owner, self.desc)
|
return '(%s): %s' % (self.owner, self.desc)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'DeveloperException(%s)' % (self.owner, )
|
return 'HierarchyException(%s)' % (self.owner, )
|
||||||
|
|
||||||
# __dev__ is not defined at import time, call this after it's defined
|
# __dev__ is not defined at import time, call this after it's defined
|
||||||
def recordFunctorCreationStacks():
|
def recordFunctorCreationStacks():
|
||||||
@ -3333,4 +3336,5 @@ __builtin__.report = report
|
|||||||
__builtin__.MiniLog = MiniLog
|
__builtin__.MiniLog = MiniLog
|
||||||
__builtin__.MiniLogSentry = MiniLogSentry
|
__builtin__.MiniLogSentry = MiniLogSentry
|
||||||
__builtin__.logBlock = logBlock
|
__builtin__.logBlock = logBlock
|
||||||
__builtin__.DeveloperException = DeveloperException
|
__builtin__.HierarchyException = HierarchyException
|
||||||
|
__builtin__.pdir = pdir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user