FileException Inconsistency?

Alex alexander.edwards at gmail.com
Wed May 13 01:23:38 UTC 2026


Hi,

 From commandline I get similar behaviour Exception vs Throwable.

with
```
writeln(entry.name);
writeln(".");
```

```
DirScan

Compiler: Digital Mars D v2.110
-----
PATH: C:\
C:\$Recycle.Bin
.
-----
PATH: C:\$Recycle.Bin
C:\$Recycle.Bin\S-1-5-18
.
-----
PATH: C:\$Recycle.Bin\S-1-5-18
File Exception: std.file.FileException at std\file.d(4683): 
C:\$Recycle.Bin\S-1-5-18: Access is denied.
----------------
0x00B84F9E
0x00B7261A
0x00B72515
0x00B724E5
0x00B723E1
0x00B71FFF
0x00B71FAC
0x00B610B0
0x00B61111
0x00B61111
0x00B61040
0x00B7CA1F
0x00B7C88E
0x00B761F4
0x00B61A47
0x753F5D49 in BaseThreadInitThunk
0x7795D83B in RtlInitializeExceptionChain
0x7795D7C1 in RtlGetAppContainerNamedObjectPath
```

vs lines commented out
```
// writeln(entry.name);
// writeln(".");
```

```
DirScan

Compiler: Digital Mars D v2.110
-----
PATH: C:\
-----
PATH: C:\$Recycle.Bin
-----
PATH: C:\$Recycle.Bin\S-1-5-18
Throwable: std.file.FileException at std\file.d(4683): 
C:\$Recycle.Bin\S-1-5-18: Access is denied.
----------------
0x00AE4F26
0x00AD25C6
0x00AD24C1
0x00AD2491
0x00AD238D
0x00AD1FAB
0x00AD1F58
0x00AC10B0
0x00AC10F5
0x00AC10F5
0x00AC1040
0x00ADC987
0x00ADC7F6
0x00AD60C4
0x00AC19F3
0x753F5D49 in BaseThreadInitThunk
0x7795D83B in RtlInitializeExceptionChain
0x7795D7C1 in RtlGetAppContainerNamedObjectPath
```

I just installed 2.112 and thought for a second it was fixed, but 
same "issue" (writelns commented out).

```
// writeln(entry.name);
// writeln(".");
```

```
DirScan

Compiler: Digital Mars D v2.112
-----
PATH: C:\
-----
PATH: C:\$Recycle.Bin
-----
PATH: C:\$Recycle.Bin\S-1-5-18
Throwable: std.file.FileException at std\file.d(4696): 
C:\$Recycle.Bin\S-1-5-18: Access is denied.
----------------
0x000A40EE
0x000922F9
0x000922C9
0x000921AD
0x00091D9F
0x00091D4C
0x000810B0
0x000810F5
0x000810F5
0x00081040
0x0009B24F
0x0009B0CF
0x00095964
0x00081587
0x753F5D49 in BaseThreadInitThunk
0x7795D83B in RtlInitializeExceptionChain
0x7795D7C1 in RtlGetAppContainerNamedObjectPath
0x00000000
```

If the writelns are uncommented out, get a FileException 
correctly as before.

Thanks



More information about the Digitalmars-d-learn mailing list