Board index » delphi » where are the runtime error codes, eh?

where are the runtime error codes, eh?

Borland Pascal 7 runtime errors; most applicable to Delphi:
    *** DOS ***
1   Invalid function number
2   File not found
3   Path not found
4   Too many open files
5   File access denied
6   Invalid file handle
12  Invalid file access code
15  Invalid drive number
16  Cannot remove current directory
17  Cannot rename across drives
18  No more files
    *** I/O ***
100 Disc read error
101 Disc write error
102 File not assigned
103 File not open
104 File not open for input
105 File not open for output
106 Invalid numeric format read from file
    *** CRITICAL ***
150 Write protected
151 Unknown unit/Bad drive request struct length
152 Drive not ready
153 Unknown command
154 CRC error in data
155 Bad drive request structure length
156 Disc seek error
157 Unknown media type
158 Sector not found
159 Printer out of paper
160 Device write fault
161 Device read fault
162 Hardware failure (C-DOS: file/device opened by another process)
    *** FATAL ***
200 Division by zero
201 Range check
202 Stack overflow (on entry to a procedure or function)
203 Heap overflow (from New() or GetMem())
204 Invalid pointer operation (from Dispose() or FreeMem())
205 Floating point overflow
206 Floating point underflow
207 Invalid floating point operation
208 Overlay manager not installed (usually when calling OvrInit)
209 Overlay file read error
210 Object not initialized
211 Call to abstract method
212 Stream registration error
213 Collection index out of range
214 Collection overflow error
215 Arithmetic overflow error
216 General Protection fault

HTH,
--
Michael Salem

 

Re:where are the runtime error codes, eh?


Quote
Chris Snell wrote:

> Howdy Delphi users,

> perhaps you can help me with a problem.

> Where are the runtime error codes? I am getting a "Runtime error 202 at
> 0001:3B28". When I use the "Find Error..." dialog it responds "Error not
> Found". Darn compiler can't make up its mind!

> When I look up "error codes" and "runtime errors" in the help system I get
> a bit of text written by some genius that indicates that a runtime error
> is "An error that occurs when the application runs". Thank you ever so
> much Borland, I never would have guessed that on my own.

> I have looked through the Users guide (the index and table of contents,
> and scanned the debugging chapter) and I cannot find the required
> runtime error table.

> Will someone please tell me where I can look up these codes, and how you
> found them, because right now I am thinking that Borland is a bunch of
> mindless jerks because they have hidden this required bit of information
> in some obscure location, and I would much rather find out that it was
> me all along, that "Ah yes, I should have known to look it up under
> 'Time, Run, Errors' or 'Compiler errors, NOT'", or in the Interbase Users
> Guide because it is in a "table" [this is intended to be a pun between the
> publishing term "table" meaning a compact arrangement of related facts
> and Borlands use of the word "table" meaning a database - Ed.] or wherever
> it turns out to be.

> And, in return, I will promise, in the future, not to use, in the
> newsgroup, run-on sentences, in my posts. (But contruct sentences unusually
> continue to, I will!)

> Thanks muchly,
>                            -Chris

Runtime error 202 means stack overflow. Check whether you are passing a
huge structure to a function. In that case, pass a pointer.

Re:where are the runtime error codes, eh?


In article <3135E3AF.7...@ix.netcom.com>,
   "R. Brian Lindahl" <blind...@ix.netcom.com> wrote:
[snip]

Quote
>> runtime error table.

>I kind of thought that these errors would never pop up.  With all the stuff
>about exceptions, and the way they catch most of the run-time errors instead
>of bringing up the "Runtime Error" dialog, I didn't even know they were still
>there.  However, I ran into one myself the other day.  I still think it
>should have been caught by an exception handler, but I guess not.

There is a compiler directive which controls whether the RTL generates
exceptions or not, which is turned on by default.  If it is turned off, it
will generate run-time errors instead.  But this isn't your problem.  
Sometimes, when the error is too severe, the program can't even properly
generate an exception, in which case is resorts to the old-fashioned runtime
errors.  This most often occurs on a stack overflow, which, if I'm not
mistaken, is what a runtime error 202 is, and there is no room on the stack to
push the exception.

//--------------------------------------------------------------------
// David S. Becker                     ADP Dealer Services (Plaza R&D)
// d...@plaza.ds.adp.com                                  (503)402-3236
//--------------------------------------------------------------------

Other Threads