comp.lang.ada
 help / color / mirror / Atom feed
* Gnat/windows specific, exception glich
@ 2003-02-06 13:51 Jano
  2003-02-06 14:20 ` David Botton
  0 siblings, 1 reply; 2+ messages in thread
From: Jano @ 2003-02-06 13:51 UTC (permalink / raw)


Hello,

I have a curious problem. I'm developing an app using Gnat that uses 
several DLLs also built with Gnat. The problem is:

I have several exception handlers at the various levels in the main 
procedure. However, when an exception is raised *inside* some proc 
imported from the DLLs, the app aborts and prints the exception in the 
console. I suspect that's caused because each DLL has its own runtime, 
as stated in the user guide.

That's somewhat puzzling because there is only one thread/task in 
execution, so I would expect that any exception would be catched by the 
handler in the main procedure. 

The burden that implies is that to prevent program abortion I must place 
a general exception handler in *each* exported function in the DLLs. Bad 
enough, I don't want the security model to depend on proper 
implementation of the DLLs. Currently, I have no idea on how to prevent 
at all abortion caused by some arbitrary DLL.

The DLLs are part of a plugin system. I can't afford to have total 
failure because a DLL is incorrectly developed.

Any ideas? Am I doomed?

-- 
-------------------------
Jano
402450[at]cepsz.unizar.es
-------------------------



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gnat/windows specific, exception glich
  2003-02-06 13:51 Gnat/windows specific, exception glich Jano
@ 2003-02-06 14:20 ` David Botton
  0 siblings, 0 replies; 2+ messages in thread
From: David Botton @ 2003-02-06 14:20 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway

Why are you not using COM (http://www.adapower.com/gnatcom)? Have the
plugins written as LocalServers and they will each be in their own process
protecting yours. If that is not possible, perhaps you can divide your own
app up with part as a LocalServer COM object (or use Ada distributed Annex)
for that part which interfaces then to DLLs or much preferably in almost (if
not all) cases to Inproc COM objects.

You then also offer freedom to implement your plugins in any language (even
Java Script :-)

David Botton

----- Original Message -----
From: "Jano" <402450@cepsz.unizar.es>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Thursday, February 06, 2003 8:51 AM
Subject: Gnat/windows specific, exception glich


> Hello,
>
> I have a curious problem. I'm developing an app using Gnat that uses
> several DLLs also built with Gnat. The problem is:
>
> I have several exception handlers at the various levels in the main
> procedure. However, when an exception is raised *inside* some proc
> imported from the DLLs, the app aborts and prints the exception in the
> console. I suspect that's caused because each DLL has its own runtime,
> as stated in the user guide.
>
> That's somewhat puzzling because there is only one thread/task in
> execution, so I would expect that any exception would be catched by the
> handler in the main procedure.
>
> The burden that implies is that to prevent program abortion I must place
> a general exception handler in *each* exported function in the DLLs. Bad
> enough, I don't want the security model to depend on proper
> implementation of the DLLs. Currently, I have no idea on how to prevent
> at all abortion caused by some arbitrary DLL.
>
> The DLLs are part of a plugin system. I can't afford to have total
> failure because a DLL is incorrectly developed.
>
> Any ideas? Am I doomed?
>
> --
> -------------------------
> Jano
> 402450[at]cepsz.unizar.es
> -------------------------
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-06 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 13:51 Gnat/windows specific, exception glich Jano
2003-02-06 14:20 ` David Botton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox