Browse Source

* bug #471 fixed: run time error 2 is now converted into a file not
found exception

florian 26 years ago
parent
commit
ccf87d0937
3 changed files with 21 additions and 8 deletions
  1. 7 2
      rtl/objpas/stre.inc
  2. 6 2
      rtl/objpas/strg.inc
  3. 8 4
      rtl/objpas/sysutils.pp

+ 7 - 2
rtl/objpas/stre.inc

@@ -31,7 +31,8 @@ Const
    SAssertionFailed = 'Assertion failed';
    SAssertionFailed = 'Assertion failed';
    SDiskFull = 'Disk Full';
    SDiskFull = 'Disk Full';
    SDivByZero = 'Division by zero';
    SDivByZero = 'Division by zero';
-   SEndOfFile = 'Read past end of file'; 
+   SEndOfFile = 'Read past end of file';
+   SFileNotFound = 'File not found';
    SFileNotAssigned = 'File not assigned';
    SFileNotAssigned = 'File not assigned';
    SFileNotOpen = 'File not open';
    SFileNotOpen = 'File not open';
    SFileNotOpenForInput = 'File not open for input';
    SFileNotOpenForInput = 'File not open for input';
@@ -56,7 +57,11 @@ Const
    SInvalidOp = 'Invalid floating point operation';
    SInvalidOp = 'Invalid floating point operation';
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1999-07-02 17:03:22  florian
+  Revision 1.8  1999-08-28 14:53:27  florian
+    * bug 471 fixed: run time error 2 is now converted into a file not
+      found exception
+
+  Revision 1.7  1999/07/02 17:03:22  florian
     + added some runtime->excpetin wrappers: eintoverflow, eoverflow, eunderflow, einvalidop
     + added some runtime->excpetin wrappers: eintoverflow, eoverflow, eunderflow, einvalidop
 
 
   Revision 1.6  1999/06/19 07:39:46  michael
   Revision 1.6  1999/06/19 07:39:46  michael

+ 6 - 2
rtl/objpas/strg.inc

@@ -32,11 +32,15 @@ Const
    SOutOfMemory = 'Speicher voll';
    SOutOfMemory = 'Speicher voll';
    STooManyOpenFiles = 'Zu viele offene Dateien';
    STooManyOpenFiles = 'Zu viele offene Dateien';
    SUnKnownRunTimeError = 'Unbekannter Laufzeitfehler : %3.3d';
    SUnKnownRunTimeError = 'Unbekannter Laufzeitfehler : %3.3d';
-   
+   SFileNotFound = 'Datei nicht gefunden';   
    
    
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-07-02 17:03:23  florian
+  Revision 1.3  1999-08-28 14:53:27  florian
+    * bug 471 fixed: run time error 2 is now converted into a file not
+      found exception
+
+  Revision 1.2  1999/07/02 17:03:23  florian
     + added some runtime->excpetin wrappers: eintoverflow, eoverflow, eunderflow, einvalidop
     + added some runtime->excpetin wrappers: eintoverflow, eoverflow, eunderflow, einvalidop
 
 
   Revision 1.1  1998/10/01 16:26:06  florian
   Revision 1.1  1998/10/01 16:26:06  florian

+ 8 - 4
rtl/objpas/sysutils.pp

@@ -216,11 +216,11 @@ Var E : Exception;
 begin
 begin
   Case Errno of
   Case Errno of
    1,203 : E:=OutOfMemory;
    1,203 : E:=OutOfMemory;
-   //!! ?? 2 is a 'file not found error' ??
-   2,204 : E:=InvalidPointer;
-   3,4,5,6,100,101,102,103,105,106 : { I/O errors }
+   204 : E:=InvalidPointer;
+   2,3,4,5,6,100,101,102,103,105,106 : { I/O errors }
      begin
      begin
      Case Errno of
      Case Errno of
+       2 : S:=SFileNotFound;
        3 : S:=SInvalidFileName;
        3 : S:=SInvalidFileName;
        4 : S:=STooManyOpenFiles;
        4 : S:=STooManyOpenFiles;
        5 : S:=SAccessDenied;
        5 : S:=SAccessDenied;
@@ -351,7 +351,11 @@ Finalization
 end.
 end.
 {
 {
     $Log$
     $Log$
-    Revision 1.30  1999-08-18 11:28:24  michael
+    Revision 1.31  1999-08-28 14:53:27  florian
+      * bug 471 fixed: run time error 2 is now converted into a file not
+        found exception
+
+    Revision 1.30  1999/08/18 11:28:24  michael
     * Fixed reallocmem bug 535
     * Fixed reallocmem bug 535
 
 
     Revision 1.29  1999/07/27 13:01:12  peter
     Revision 1.29  1999/07/27 13:01:12  peter