Commit f85c4752 authored by 's avatar

Got rid of old sys.exc_* usage

parent 2785c11a
......@@ -83,7 +83,7 @@
#
##############################################################################
__doc__="""Copy interface"""
__version__='$Revision: 1.51 $'[11:-2]
__version__='$Revision: 1.52 $'[11:-2]
import sys, string, Globals, Moniker, tempfile, ExtensionClass
from marshal import loads, dumps
......@@ -211,7 +211,7 @@ class CopyContainer(ExtensionClass.Base):
try: ob._notifyOfCopyTo(self, op=0)
except: raise CopyError, MessageDialog(
title='Copy Error',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
ob=ob._getCopy(self)
ob.manage_afterClone(ob)
......@@ -232,7 +232,7 @@ class CopyContainer(ExtensionClass.Base):
try: ob._notifyOfCopyTo(self, op=1)
except: raise CopyError, MessageDialog(
title='Move Error',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
if not sanity_check(self, ob):
raise CopyError, 'This object cannot be pasted into itself'
......@@ -270,7 +270,7 @@ class CopyContainer(ExtensionClass.Base):
try: self._checkId(new_id)
except: raise CopyError, MessageDialog(
title='Invalid Id',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
ob=self._getOb(id)
if not ob.cb_isMoveable():
......@@ -279,7 +279,7 @@ class CopyContainer(ExtensionClass.Base):
try: ob._notifyOfCopyTo(self, op=1)
except: raise CopyError, MessageDialog(
title='Rename Error',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
self._delObject(id)
if hasattr(ob, 'aq_base'):
......@@ -304,13 +304,13 @@ class CopyContainer(ExtensionClass.Base):
try: self._checkId(id)
except: raise CopyError, MessageDialog(
title='Invalid Id',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
self._verifyObjectPaste(ob, REQUEST)
try: ob._notifyOfCopyTo(self, op=0)
except: raise CopyError, MessageDialog(
title='Clone Error',
message=sys.exc_value,
message=sys.exc_info()[1],
action ='manage_main')
ob=ob._getCopy(self)
ob._setId(id)
......
......@@ -89,8 +89,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.71 2000/05/24 20:53:34 shane Exp $'''
__version__='$Revision: 1.71 $'[11:-2]
$Id: SimpleItem.py,v 1.72 2000/05/26 15:43:07 brian Exp $'''
__version__='$Revision: 1.72 $'[11:-2]
import regex, sys, Globals, App.Management, Acquisition, App.Undo
import AccessControl.Role, AccessControl.Owned, App.Common
......@@ -475,7 +475,6 @@ def format_exception(etype,value,tb,limit=None):
tb = tb.tb_next
n = n+1
result.append(join(traceback.format_exception_only(etype, value),' '))
# sys.exc_type,sys.exc_value,sys.exc_traceback=etype,value,tb
return result
def pretty_tb(t,v,tb):
......
Markdown is supported
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