Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-21-2008
acbell acbell is offline
Registered User
 
Name: Andrew Bell
Organization: Iowa State University
Project: National Resources Inventory
 
Join Date: Jan 2005
Location: Ames, IA, USA
Posts: 89
Dump on Exception in C++ Service?

Hi,

Normally the ICE Service (C++) class catches all user exceptions and continues on happily. Is there a nice way to disable this behavior so that an exception simply causes the process to exit (so you can get a stack trace)? If the exception is generated from a call to another server, is there a good way to know what remote operation generated the exception?

Thanks,
Reply With Quote
  #2 (permalink)  
Old 04-22-2008
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,541
Hi Andrew,

Note that this isn't really specific to the Ice::Service class implementation. Any exceptions raised by a servant method implementation is catch by the Ice server runtime and causes a dispatch warning to be displayed if Ice.Warn.Dispatch=1 (the default).

There's no way to change this behavior and there's also no easy way to figure out which Ice invocation (from the servant implementation) might have caused the exception. The best is to catch and handle exceptions from Ice invocations if you don't want these exceptions to propagate. You could also add a catch block in your servant method implementation to catch unexpected exceptions and terminate the server.

With Ice 3.3b, you could also write a dispatch interceptor to catch unexpected exceptions raised by a servant method implementation and eventually terminate the process. Note however that this new feature is not documented yet in the Ice 3.3b manual, it will be for the final release. You can take a look at the dispatch interceptor test from test/Ice/interceptor to see how it works in the meantime.

Cheers,
Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceBox in IceGrid does not generate core dump file sinofool Help Center 1 04-10-2008 10:36 PM
Core dump in Python servant locator blair Patches 2 06-26-2007 01:29 PM
Thread dump when Java server is stopped by IceGrid mefoster Bug Reports 1 01-29-2007 06:04 PM
Ice 3.1.1 core dump while invoke on replica sinofool Help Center 8 11-06-2006 10:32 AM
Core dump building Ice 1.4 on Solaris brian Help Center 3 06-18-2004 05:27 PM


All times are GMT -4. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.