realbasic-plugins
[Top] [All Lists]

Re: Problem with catching exception thrown from plugin

To: realbasic-plugins at lists dot realsoftware dot com
Subject: Re: Problem with catching exception thrown from plugin
From: "a.zatsepin" <a dot zatsepin at softage dot ru>
Date: Sat, 21 Jan 2006 11:57:01 +0600
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <20060120180049 dot 2BDDF103E601 at lists dot realsoftware dot com>

Message: 4
Subject: Re: Problem with catching exception thrown from plugin
From: Thomas Tempelmann <listuser at tempel dot org>
Date: Fri, 20 Jan 2006 11:54:20 +0100

a.zatsepin wrote:

I've got a problem with catching exception thrown from plugin.
C++ code is:

REALobject Exception = REALnewInstance("NilObjectException");
REALRaiseException(Exception);

Are you aware that you need to return from your C routine normally
right after calling REALRaiseException? That's because this call
does not actually raise and change control of flow, but only sets
up some internal flags that'll be checked once control gets back
to the caller.

Also, take a look at my "Plugin Starter", it contains working
exception raising code.

see here: www.tempel.org/rb/

Thomas

Thanks for answer, Thomas.
Problem is that exception is rased but not handled in RB in block try - catch, it proceeds further and I see error dialog: "NilObjectException was not handled. App must shut down". Also this exception may be caught in App.UnhandledException event, but not in that try - catch block that I want for proper error handling. But in some places exceptions are caught
always. I can't now understand reasone of  this difference.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>