Article View: borland.public.cppbuilder.nativeapi
Article #9428Re: indicating a service fails to start
From: Mark Guerrieri
Date: Mon, 12 Jul 2004 16:08
Date: Mon, 12 Jul 2004 16:08
35 lines
1926 bytes
1926 bytes
I've had issues in the past with catch(...) - instead try
throw Exception("Error starting service")
and
catch(Exception& e)
and see if that works...
Mark
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:5flue0505ec84ggjh3gi7ne4ooafutfigs@4ax.com...
> Benjamin Pratt wrote:
>
> >void __fastcall TDynaPowerDX::ServiceStart(TService *Sender, bool
&Started)
> >{
> > try
> > {
> > DataExchange = new TDataExchangeThread(false);
> > }
> > catch(...)
> > {
> > MessageBox(HWND_DESKTOP, "Exception caught!", "Exception",
> >
> >For some reason, when the thread constructor throws, the catch block in
> >ServiceStart does not catch the exception. I have put a MessageBox in the
> >catch to test it, and it never is displayed.
>
> Not knowing any better, I'd say you never come back from
> TDataExchangeThread(false);
>
>
Technical Details
Message-ID:
<40f2b780$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40eedd30$1@newsgroups.borland.com> <40eeee9b@newsgroups.borland.com> <40eef575@newsgroups.borland.com> <5flue0505ec84ggjh3gi7ne4ooafutfigs@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6b63c33df8d56275 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mark Guerrieri" <mguerrieri@cmsgrp.com> From: "Mark Guerrieri" <mguerrieri@cmsgrp.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40eedd30$1@newsgroups.borland.com> <40eeee9b@newsgroups.borland.com> <40eef575@newsgroups.borland.com> <5flue0505ec84ggjh3gi7ne4ooafutfigs@4ax.com> Subject: Re: indicating a service fails to start Date: Mon, 12 Jul 2004 12:08:32 -0400 Lines: 37 Organization: Creative Marketing Strategies X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 66.200.143.50 Message-ID: <40f2b780$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089648512 66.200.143.50 (12 Jul 2004 09:08:32 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail