Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
614533db
Commit
614533db
authored
Aug 01, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make doubly sure that SystemExit isn't caught be generic error handling.
parent
07affa72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/ZEO/zrpc/connection.py
src/ZEO/zrpc/connection.py
+10
-5
No files found.
src/ZEO/zrpc/connection.py
View file @
614533db
...
...
@@ -167,11 +167,14 @@ class Connection(smac.SizedMessageAsyncConnection):
meth
=
getattr
(
self
.
obj
,
name
)
try
:
ret
=
meth
(
*
args
)
except
(
SystemExit
,
KeyboardInterrupt
):
raise
except
Exception
,
msg
:
error
=
sys
.
exc_info
()[:
2
]
log
(
"%s() raised exception: %s"
%
(
name
,
msg
),
zLOG
.
ERROR
,
error
=
sys
.
exc_info
())
return
self
.
return_error
(
msgid
,
flags
,
error
[
0
],
error
[
1
])
error
=
sys
.
exc_info
()
log
(
"%s() raised exception: %s"
%
(
name
,
msg
),
zLOG
.
ERROR
,
error
=
error
)
error
=
error
[:
2
]
return
self
.
return_error
(
msgid
,
flags
,
*
error
)
if
flags
&
ASYNC
:
if
ret
is
not
None
:
...
...
@@ -186,7 +189,9 @@ class Connection(smac.SizedMessageAsyncConnection):
self
.
send_reply
(
msgid
,
ret
)
def
handle_error
(
self
):
self
.
log_error
()
if
sys
.
exc_info
()[
0
]
==
SystemExit
:
raise
sys
.
exc_info
()
self
.
log_error
(
"Error caught in asyncore"
)
self
.
close
()
def
log_error
(
self
,
msg
=
"No error message supplied"
):
...
...
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