comp.lang.ada
 help / color / mirror / Atom feed
* Re: exception
  1998-10-30  0:00 exception Pablo Campo
@ 1998-10-30  0:00 ` Corey Ashford
  1998-10-31  0:00 ` exception Jerry van Dijk
  1998-11-03  0:00 ` exception Steve Quinlan
  2 siblings, 0 replies; 9+ messages in thread
From: Corey Ashford @ 1998-10-30  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]


Pablo Campo wrote in message <363992D5.643F343E@biha01.ehu.es>...
>I am a programmer of ADA and I use the Alsys Active ADA envirotment
>version 5.3
>
>I am making a proyect full of tasking and interrupts (for example I
>manage the clock interrupt) and my problem is that  my program breaks
>down in execution time and the only information  I recive is "Program
>terminated. Unhandled exception".
>Yesterday, I spent all the morning handling exceptions in all tasks and
>subprograms but the result was the same.
>�What can I do for obtain more information of the problem?
>
>Nacho - A spanish enginier student.
>

It doesn't even tell you which exception occurred?  Wow... that's not
real helpful.

Perhaps the Alsys debugger has a way of setting a breakpoint when an
exception occurs.  You might look around for that in the debugger
user's manual (if there is one).

- Corey






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

* exception
@ 1998-10-30  0:00 Pablo Campo
  1998-10-30  0:00 ` exception Corey Ashford
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Pablo Campo @ 1998-10-30  0:00 UTC (permalink / raw)


I am a programmer of ADA and I use the Alsys Active ADA envirotment
version 5.3

I am making a proyect full of tasking and interrupts (for example I
manage the clock interrupt) and my problem is that  my program breaks
down in execution time and the only information  I recive is "Program
terminated. Unhandled exception".
Yesterday, I spent all the morning handling exceptions in all tasks and
subprograms but the result was the same.
�What can I do for obtain more information of the problem?

Nacho - A spanish enginier student.





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

* Re: exception
  1998-10-30  0:00 exception Pablo Campo
  1998-10-30  0:00 ` exception Corey Ashford
@ 1998-10-31  0:00 ` Jerry van Dijk
  1998-11-03  0:00 ` exception Steve Quinlan
  2 siblings, 0 replies; 9+ messages in thread
From: Jerry van Dijk @ 1998-10-31  0:00 UTC (permalink / raw)


Pablo Campo (jtacaezp@biha01.ehu.es) wrote:

: I am a programmer of ADA and I use the Alsys Active ADA envirotment
: version 5.3

: I am making a proyect full of tasking and interrupts (for example I
: manage the clock interrupt) and my problem is that  my program breaks
: down in execution time and the only information  I recive is "Program
: terminated. Unhandled exception".

Analyzing the problem requires a lot more information. Can you post a
small example program that shows this behaviour ?

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




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

* Re: exception
  1998-10-30  0:00 exception Pablo Campo
  1998-10-30  0:00 ` exception Corey Ashford
  1998-10-31  0:00 ` exception Jerry van Dijk
@ 1998-11-03  0:00 ` Steve Quinlan
  2 siblings, 0 replies; 9+ messages in thread
From: Steve Quinlan @ 1998-11-03  0:00 UTC (permalink / raw)


Pablo Campo wrote:
> 
> I am a programmer of ADA and I use the Alsys Active ADA envirotment
> version 5.3
> 
> I am making a proyect full of tasking and interrupts (for example I
> manage the clock interrupt) and my problem is that  my program breaks
> down in execution time and the only information  I recive is "Program
> terminated. Unhandled exception".
> Yesterday, I spent all the morning handling exceptions in all tasks and
> subprograms but the result was the same.
> �What can I do for obtain more information of the problem?
> 
> Nacho - A spanish enginier student.
I don't understand how people can use some of these implementations
which make it so hard to figure out where an exception came from unless
you are in a debugger. OCS and Aonix for example dump out the exception
and a traceback in human readable format (unit/line #) to stdout if a
program dies with an unhandled exception. That symbol table is a small
price to pay for the ability to do problem determination.  

Best I can suggest is: Does that environment come with a debugger that
you can run the application under? If you've got hanlders in all the
tasks and it's still dying, maybe it's happening at elaboration outside
the scope of the task body handlers. You'd need a debugger that is
capable of breaking on exceptions during elaboration.




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

* exception
@ 1998-11-18  0:00 alex
  0 siblings, 0 replies; 9+ messages in thread
From: alex @ 1998-11-18  0:00 UTC (permalink / raw)


How to i treat exception and redirect them inside the program ?




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

* Exception
@ 2005-09-08 16:54 TC
  2005-09-08 17:06 ` Exception Pascal Obry
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: TC @ 2005-09-08 16:54 UTC (permalink / raw)


Why if an error is present no one of exception is write?
I create an array index exception for testing.

procedure Testo is
Begin
...
exception
                   when Error : Constraint_Error | Data_Error =>
                   Put ("Si ᅵ verificato un errore: ");
                   Put_Line (Ada.Exceptions.Exception_Name(Error));
                   when Error : others=>
                   Put ("Si ᅵ verificato un errore: ");
                   Put_Line (Ada.Exceptions.Exception_Name(Error));
                     raise;
end testo;



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

* Re: Exception
  2005-09-08 16:54 Exception TC
@ 2005-09-08 17:06 ` Pascal Obry
  2005-09-08 17:20 ` Exception Martin Krischik
  2005-09-08 18:21 ` Exception Georg Bauhaus
  2 siblings, 0 replies; 9+ messages in thread
From: Pascal Obry @ 2005-09-08 17:06 UTC (permalink / raw)
  To: TC

TC a ï¿œcrit :
> Why if an error is present no one of exception is write?
> I create an array index exception for testing.
> 
> procedure Testo is
> Begin
> ....
> exception

Because the special Ada command "..." is equivalent to C "exit(0)", in
other words it says exit now and do not pass through the exception handlers.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: Exception
  2005-09-08 16:54 Exception TC
  2005-09-08 17:06 ` Exception Pascal Obry
@ 2005-09-08 17:20 ` Martin Krischik
  2005-09-08 18:21 ` Exception Georg Bauhaus
  2 siblings, 0 replies; 9+ messages in thread
From: Martin Krischik @ 2005-09-08 17:20 UTC (permalink / raw)


TC wrote:

> Why if an error is present no one of exception is write?
> I create an array index exception for testing.


> procedure Testo is
> Begin
> ...
> exception
>                    when Error : Constraint_Error | Data_Error =>
>                    Put ("Si ᅵ verificato un errore: ");
>                    Put_Line (Ada.Exceptions.Exception_Name(Error));
>                    when Error : others=>
>                    Put ("Si ᅵ verificato un errore: ");
>                    Put_Line (Ada.Exceptions.Exception_Name(Error));
>                      raise;
> end testo;

One possibility: Only exceptions between begin and exception are handled. If
the exception happens between is and being it goes to the caller.

Note: this is especially important when dealing with task types.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



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

* Re: Exception
  2005-09-08 16:54 Exception TC
  2005-09-08 17:06 ` Exception Pascal Obry
  2005-09-08 17:20 ` Exception Martin Krischik
@ 2005-09-08 18:21 ` Georg Bauhaus
  2 siblings, 0 replies; 9+ messages in thread
From: Georg Bauhaus @ 2005-09-08 18:21 UTC (permalink / raw)


TC wrote:
> Why if an error is present no one of exception is write?

Which error is present in your program? Or which error
do you expect to be present?

> I create an array index exception for testing.

Could you give some details like the array's declaration,
how you used it, how you compiled the program (switches,etc.)?



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

end of thread, other threads:[~2005-09-08 18:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-08 16:54 Exception TC
2005-09-08 17:06 ` Exception Pascal Obry
2005-09-08 17:20 ` Exception Martin Krischik
2005-09-08 18:21 ` Exception Georg Bauhaus
  -- strict thread matches above, loose matches on Subject: below --
1998-11-18  0:00 exception alex
1998-10-30  0:00 exception Pablo Campo
1998-10-30  0:00 ` exception Corey Ashford
1998-10-31  0:00 ` exception Jerry van Dijk
1998-11-03  0:00 ` exception Steve Quinlan

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