comp.lang.ada
 help / color / mirror / Atom feed
* What does "raised ADA.IO_EXCEPTIONS.DATA_ERROR" mean?
@ 2003-01-27 10:32 Fatafa
  2003-01-27 13:05 ` Colin Paul Gloster
  2003-01-27 18:33 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: Fatafa @ 2003-01-27 10:32 UTC (permalink / raw)


I ran a compiled Ada program and got back the error :

raised ADA.IO_EXCEPTIONS.DATA_ERROR

Does anyone know what this means?

Thanks



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

* Re: What does "raised ADA.IO_EXCEPTIONS.DATA_ERROR" mean?
@ 2003-01-27 11:18 Grein, Christoph
  0 siblings, 0 replies; 4+ messages in thread
From: Grein, Christoph @ 2003-01-27 11:18 UTC (permalink / raw)
  To: comp.lang.ada

> I ran a compiled Ada program and got back the error :
> 
> raised ADA.IO_EXCEPTIONS.DATA_ERROR
> 
> Does anyone know what this means?

Get a text book on Ada. Anybody using Ada knows what this means.

See RM A.13(13) You probably read a data item from a file or keyboard input that 
does not have the expected type.



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

* Re: What does "raised ADA.IO_EXCEPTIONS.DATA_ERROR" mean?
  2003-01-27 10:32 Fatafa
@ 2003-01-27 13:05 ` Colin Paul Gloster
  2003-01-27 18:33 ` Stephen Leake
  1 sibling, 0 replies; 4+ messages in thread
From: Colin Paul Gloster @ 2003-01-27 13:05 UTC (permalink / raw)


Fatafa said today:
"I ran a compiled Ada program and got back the error :

raised ADA.IO_EXCEPTIONS.DATA_ERROR

Does anyone know what this means?"

When giving input to your program, you probably gave it something it was
not designed to (e.g. maybe it needed a number and you typed in text).

From HTTP://WWW.AdaIC.org/standards/95lrm/html/RM-A-13.html :

"[..]

The exception Data_Error can be propagated by the procedure Read (or by
the Read attribute) if the element read cannot be
interpreted as a value of the required subtype. This exception is also
propagated by a procedure Get (defined in the package
Text_IO) if the input character sequence fails to satisfy the required
syntax, or if the value input does not belong to the range of the
required subtype.

[..]"



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

* Re: What does "raised ADA.IO_EXCEPTIONS.DATA_ERROR" mean?
  2003-01-27 10:32 Fatafa
  2003-01-27 13:05 ` Colin Paul Gloster
@ 2003-01-27 18:33 ` Stephen Leake
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Leake @ 2003-01-27 18:33 UTC (permalink / raw)


jul_tuf@hotmail.com (Fatafa) writes:

> I ran a compiled Ada program and got back the error :
> 
> raised ADA.IO_EXCEPTIONS.DATA_ERROR
> 
> Does anyone know what this means?

Run it again under the debugger, and set a break on exceptions. Then
you will be shown the exact line that is causing the problem

Or, if using GNAT, add an exception handler that dumps the stack
symbolically; then you can see the exact line without the debugger.

-- 
-- Stephe



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

end of thread, other threads:[~2003-01-27 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-27 11:18 What does "raised ADA.IO_EXCEPTIONS.DATA_ERROR" mean? Grein, Christoph
  -- strict thread matches above, loose matches on Subject: below --
2003-01-27 10:32 Fatafa
2003-01-27 13:05 ` Colin Paul Gloster
2003-01-27 18:33 ` Stephen Leake

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