DelphiFAQ Home Search:
General :: Programming :: Delphi :: VCL
About the Delphi VCL (Visual Component Library)

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

When and why is an EFCreateError exception raised?

Question:

My application throws an EFCreateError exception - what does that mean?

Answer:

The EFCreateError eception is raised when an error occurred during creation of a TFileStream stream (which is the creation of a new file).

Probable reasons: lack of access rights, lack of disk space. See the code below (part of unit Classes.pas where this exception is raised.

constructor TFileStream.Create(const FileName: string; Mode: Word);
 begin
 //...
     FHandle := FileCreate(FileName);
     if FHandle < 0 then
       raise EFCreateError.CreateResFmt(@SFCreateError, [FileName]);
 //...
 end;
 

Generated 20:02:07 on Oct 17, 2018