comp.lang.ada
 help / color / mirror / Atom feed
From: rgelb@csulb.edu (Robert Gelb)
Subject: Help with Exceptions!
Date: 1996/05/07
Date: 1996-05-07T00:00:00+00:00	[thread overview]
Message-ID: <4mmimq$s4r@hatathli.csulb.edu> (raw)


I am doing a homework assignment in ADA and I am confused by the
exceptions.  My question is this: when I catch an error with the
exception, how can I go back to statement where the error occured (or the
statement next to it)? 
I know in Visual Basic you can do a 'resume next' statement which returns
you to the statement next to the one where the error occured

VB:
sub test()
	dim x as integer
	on error goto ErrHandler
	x = 1000000	'error occurs here
	x = 3		'resume next returns the 	
			'execution here
	Exit sub			
ErrHandler:
resume next	'return execution
end sub

ADA:
procedure test is
	x:integer;
begin
	x:=10000000;
	x:=3;
exception
	when CONSTRAINT_ERROR=>
		put("Error");
		--how can I go back to 'x:=3' statement
end test;


--
Robert Gelb
Senior Systems Analyst
Data Express
Garden Grove, California USA
(714)895-8832




             reply	other threads:[~1996-05-07  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-07  0:00 Robert Gelb [this message]
1996-05-07  0:00 ` Help with Exceptions! Steve Howard
1996-05-07  0:00   ` Robert Dewar
     [not found]   ` <4mqio5$a8b@news.sanders.lockheed.com>
1996-05-09  0:00     ` Robert L. Spooner, AD3K
1996-05-10  0:00   ` Jon S Anthony
1996-05-10  0:00     ` Robert A Duff
1996-05-07  0:00 ` John Herro
1996-05-07  0:00 ` Vincent Smeets
     [not found] ` <318F94D9.35AB@io.com>
1996-05-10  0:00   ` George F.Rice
1996-05-13  0:00     ` Dave Jones
1996-05-13  0:00   ` Robert I. Eachus
1996-05-14  0:00     ` John Herro
1996-05-14  0:00       ` Robert I. Eachus
1996-05-14  0:00   ` Theodore E. Dennison
1996-05-14  0:00     ` Robert A Duff
1996-05-14  0:00 ` Michel Gauthier
1996-05-14  0:00   ` Robert A Duff
1996-05-15  0:00     ` Norman H. Cohen
1996-05-15  0:00       ` Robert A Duff
1996-05-15  0:00 ` Michel Gauthier
1996-05-16  0:00 ` Jon S Anthony
1996-05-16  0:00   ` Robert A Duff
1996-05-16  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-05-09  0:00 tmoran
replies disabled

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