comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Interesting AWS error.
Date: Wed, 10 Dec 2014 09:43:20 +0100
Date: 2014-12-10T09:43:20+01:00	[thread overview]
Message-ID: <1i3v7l7hdsio7$.13u4nz42lklre$.dlg@40tude.net> (raw)
In-Reply-To: GFQhw.778060$Ub6.94095@fx20.iad

On Tue, 09 Dec 2014 22:15:16 -0700, Shark8 wrote:

> I'm running AWS on windows, built with Pascal's now-disappeared* .bat 
> file and [IIRC] with SSL support. I'm getting the following when I try 
> feeding an https protocol URL to the AWS.Client.Get subprogram:
> 
> raised PROGRAM_ERROR : aws-client.adb:317 finalize/adjust raised exception
> 
> The indicated line seems to be a declare-block, literally the word 
> 'declare'... which makes the PROGRAM_ERROR itself puzzling to me.

It likely is an induced error, the original one is swallowed. You should
use GNAT exception tracing in order to track the original problem down,
which could be an induced one as well.

Consider this scenario, you get an exception somewhere. That winds the
stack up. This causes some controlled object to finalize in some block. If
the exception is bad, the finalization fails [*] and a second exception is
propagated. Upon leaving Finalize that exception is converted to a third
exception, the Program_Error one. This could repeat itself many times, so
what you get could have nothing to do with the original issue at all.

---------------------------
* It is not obvious but in fact quite difficult to design Finalize in a way
to make it survive any unanticipated exception winding the stack up. The
reason for this is that it is barely testable and that complex controlled
objects are not well insulated from each other and the environment. So
interactions that happen upon normal object finalization substantially
differ from ones upon an exception propagation, especially if that comes
from a failed initialization or construction.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-12-10  8:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  5:15 Interesting AWS error Shark8
2014-12-10  8:43 ` Dmitry A. Kazakov [this message]
2014-12-10 15:26   ` Shark8
2014-12-10 15:41     ` Dmitry A. Kazakov
2014-12-10 12:34 ` Pascal Obry
2014-12-10 15:21   ` Shark8
2014-12-10 15:30     ` Pascal Obry
2014-12-10 16:30       ` Shark8
2014-12-10 19:39         ` Shark8
2014-12-10 21:11           ` Pascal Obry
replies disabled

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