Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
aadebc3f
Commit
aadebc3f
authored
Feb 24, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to use standard error machinery.
The previous non-standard machinery didn't like error instances.
parent
9de16f7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
33 deletions
+11
-33
lib/python/Products/ExternalMethod/ExternalMethod.py
lib/python/Products/ExternalMethod/ExternalMethod.py
+11
-33
No files found.
lib/python/Products/ExternalMethod/ExternalMethod.py
View file @
aadebc3f
...
...
@@ -235,41 +235,19 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit,
__traceback_info__
=
args
,
kw
,
self
.
func_defaults
try
:
try
:
try
:
return
apply
(
f
,
args
,
kw
)
except
TypeError
,
v
:
tb
=
sys
.
exc_traceback
try
:
if
((
self
.
func_code
.
co_argcount
-
len
(
self
.
func_defaults
or
())
-
1
==
len
(
args
))
and
self
.
func_code
.
co_varnames
[
0
]
==
'self'
):
return
apply
(
f
,(
self
.
aq_parent
,)
+
args
,
kw
)
raise
TypeError
,
v
,
tb
finally
:
tb
=
None
except
:
error_type
=
sys
.
exc_type
error_value
=
sys
.
exc_value
try
:
return
apply
(
f
,
args
,
kw
)
except
TypeError
,
v
:
tb
=
sys
.
exc_traceback
if
lower
(
error_type
)
in
(
'redirect'
,):
raise
error_type
,
error_value
,
tb
if
(
type
(
error_value
)
is
type
(
''
)
and
regex
.
search
(
'[a-zA-Z]>'
,
error_value
)
>
0
):
error_message
=
error_value
else
:
error_message
=
''
error_tb
=
pretty_tb
(
error_type
,
error_value
,
tb
)
c
=
self
.
aq_parent
try
:
s
=
getattr
(
c
,
'standard_error_message'
)
v
=
HTML
.
__call__
(
s
,
c
,
self
.
aq_acquire
(
'REQUEST'
),
error_type
=
error_type
,
error_value
=
error_value
,
error_tb
=
error_tb
,
error_traceback
=
error_tb
,
error_message
=
error_message
)
except
:
v
=
'Sorry, an error occured'
raise
error_type
,
v
,
tb
finally
:
tb
=
None
if
((
self
.
func_code
.
co_argcount
-
len
(
self
.
func_defaults
or
())
-
1
==
len
(
args
))
and
self
.
func_code
.
co_varnames
[
0
]
==
'self'
):
return
apply
(
f
,(
self
.
aq_parent
,)
+
args
,
kw
)
raise
TypeError
,
v
,
tb
finally
:
tb
=
None
except
:
self
.
raise_standardErrorMessage
()
def
function
(
self
):
return
self
.
_function
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment