Delphi's online help documentation seems to miss the run-time error codes. I usually looked them up in my old Borland Pascal for Windows help file - now they are here for fast access:

 

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        

100        Disk read error        

101        Disk 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        

200        Division by zero        

201        Range check error        

202        Stack overflow error        

203        Heap overflow error        

204        Invalid pointer operation        

205        Floating point overflow        

206        Floating point underflow        

207        Invalid floating point operation        

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        

 


Взято с сайтаhttp://www.delphifaq.com

HKEY_CURRENT_USER\Software\Borland\Delphi\4.0\Debugging

 

ViewCPUOnException=0

Иногда выскакивают ошибки типа "Internal Error SY424", вот расшифровка префиксов: B : debugger BC : debugger BR : browser C : codegen CM : command line version of the compiler D : parser

 

When I try to add a resource to my project's .res file, I get a "Duplicate Resource" error when linking. The resource I have added is a unique resource. How can I successfully add the resource to my project?

 

 

The projects resource file is generated by the IDE wizard, and is not intended to be modified. To add additional resources to your project, create a separate resource file with a unique name that does not conflict with either the project or any of  the unit names. Then to add the resource file to Delphi, simply add the following line to any unit file in the project:

 

{$R MyRes.Res}

 

(where MyRes.Res is the name of the resource file).

 

To add the resource to Borland's C++ Builder, add the resource

from the project manager.

 

 Ошибка "Access Violation" возникает, когда идёт обращение к памяти к которой обращение запрещено. Это возможно во многих случаях, но наиболее типичные ситуации я попытаюсь перечислить:

 

1) Обращение к не созданному объекту.

 

Code:

var e:TEdit;

 

begin

e.text:='Hello world!';

end;

 

В данном случае объект e ещё не создан и идёт обращение к памяти, которая ещё не выделена.

 

 Data segment too large error

 

Typed constants are added to the Program's data segment. Untyped constants are added to the code segment of the application only if they are used. Unless you are going to reassign the value of a typed constant, you should use an untyped constant instead. Typed constants should be replaced with initialized variables to be compatible with future versions of the compiler.

 

Example:

Code:

{This adds the constant to the data segment}

const SomeTypedString : string = 'Test';

const SomeTypedInt : integer = 5;

 

{This adds the constant to the code segment if used}

const SomeUnTypedString = 'Test';

const SomeUnTypedInt = 5;

 

 

I receive an "Interface is not supported" error when trying to use an interface.

 

Verify that STDVCL32.DLL and your type library are registered. If casting an interface, you must be using DCOM and the type library must be registered on the client.

This usually occurs when you move a project to another drive or directory. Simply deleting the project's .DSM and .DSK files should remedy the situation.

 

Code:

Try

{здесь вы пишите код в котором может произойти ошибка}

Except

{здесь вы пишите код который выполнится если ошибка произойдёт, если ошибки не будет то этот код не выполняется}

End

 

Вот как будет выполняться код:

 

 

Stack Overflow, Runtime error 202

Simply put, stack overflows are caused by putting too much on the stack. Usually, they are caused by recursive procedures that never end. A good example would be creating an event handler for the TMemo's onChange event, and making a change to the Memo during the processing of the event. Every time the OnChange event gets fired, another change is made, so the OnChange event gets fired again in an almost endless loop. The loop finally ends when the stack overflows, and the application crashes.

 

Here is an example of a recursive procedure:

 

Code:

procedure RecursiveBlowTheStack;

begin

RecursiveBlowTheStack;

end;

 

Sometimes, a stack overflow is caused by too many large procedures. Each procedure calls another procedure, until the stack simply overflows. This can be remidied by breaking up large procedures into smaller ones. A good rule of thumb in regard to a procedures size is if the procedure's source code takes up more than a screen, its time to break it down into smaller procedures.

 

The error is usually caused because the server can't be located. Make sure you can ping the server machine using the string you typed into the ComputerName property of the TRemoteServer. You might also want to try using an IP address instead in case there is some problem with your DNS configuration or the hosts file. Try setting the "Default Authentication Level" to (Run DCOMCNFG on the server to do this.) Lastly, check the Microsoft Developer's Network on the Web for the latest information on this Microsoft transport. The MSDN can be located at the time of the writing at www.microsoft.com/msdn.