November 25, 2014 Re: Ranges and Exception handling PR 2724 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marco Leise | On Friday, 21 November 2014 at 16:57:29 UTC, Marco Leise wrote: > Am Fri, 21 Nov 2014 08:56:17 +0000 > schrieb "Jonathan Marler" <johnnymarler@gmail.com>: > >> I actually ran into this problem today when using the dirEntries function in std.file. I was attempting to iterate all the files on my C drive and I got an Access Denied error which caused the DirIterator to throw an exception. There's nothing I could do to catch the exception and continue. I'm very glad people are aware of this problem and I'm glad you are trying to do something about it. > > Yep, that dirEntries Exception is quite the show stopper. You > need to be certain that you have access to all directories > that it may encounter, which makes it unusable for file system > roots, but also breaks way to easily with unreadable > directories in user directories when all you need is a list of > the _accessible_ files. > > The bug reports so far: > > std.file: dirEntries-range crashes, when hitting the system folder "System Volume Information" > https://issues.dlang.org/show_bug.cgi?id=12513 > > DirEntries throws in foreach > https://issues.dlang.org/show_bug.cgi?id=12391 > > dirEntries throws when encountering a "long path" on windows > https://issues.dlang.org/show_bug.cgi?id=8967 Submitted my idea as a PR in phobos here: https://github.com/D-Programming-Language/phobos/pull/2655 |
November 25, 2014 Re: Ranges and Exception handling PR 2724 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On Tuesday, 25 November 2014 at 00:46:11 UTC, Jonathan Marler wrote: > On Friday, 21 November 2014 at 16:57:29 UTC, Marco Leise wrote: >> Am Fri, 21 Nov 2014 08:56:17 +0000 >> schrieb "Jonathan Marler" <johnnymarler@gmail.com>: >> >>> I actually ran into this problem today when using the dirEntries function in std.file. I was attempting to iterate all the files on my C drive and I got an Access Denied error which caused the DirIterator to throw an exception. There's nothing I could do to catch the exception and continue. I'm very glad people are aware of this problem and I'm glad you are trying to do something about it. >> >> Yep, that dirEntries Exception is quite the show stopper. You >> need to be certain that you have access to all directories >> that it may encounter, which makes it unusable for file system >> roots, but also breaks way to easily with unreadable >> directories in user directories when all you need is a list of >> the _accessible_ files. >> >> The bug reports so far: >> >> std.file: dirEntries-range crashes, when hitting the system folder "System Volume Information" >> https://issues.dlang.org/show_bug.cgi?id=12513 >> >> DirEntries throws in foreach >> https://issues.dlang.org/show_bug.cgi?id=12391 >> >> dirEntries throws when encountering a "long path" on windows >> https://issues.dlang.org/show_bug.cgi?id=8967 > > Submitted my idea as a PR in phobos here: https://github.com/D-Programming-Language/phobos/pull/2655 Woops wrong link, heres the right one: https://github.com/D-Programming-Language/phobos/pull/2768 |
December 27, 2014 Re: Ranges and Exception handling PR 2724 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert burner Schadek | On Saturday, 15 November 2014 at 01:43:07 UTC, Robert burner Schadek wrote:
> This PR https://github.com/D-Programming-Language/phobos/pull/2724 adds an generic way of handling Exception in Range processing. quickfur and Dicebot ask me to start a thread here so the concept could be discussed.
We are currently searching for a name for an enum that is used to select which methods of the range to handle.
Current ideas are found in the PR. please have a look and give comments.
|
December 27, 2014 Re: Ranges and Exception handling PR 2724 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert burner Schadek | On Saturday, 27 December 2014 at 22:14:41 UTC, Robert burner
Schadek wrote:
> On Saturday, 15 November 2014 at 01:43:07 UTC, Robert burner Schadek wrote:
>> This PR https://github.com/D-Programming-Language/phobos/pull/2724 adds an generic way of handling Exception in Range processing. quickfur and Dicebot ask me to start a thread here so the concept could be discussed.
>
> We are currently searching for a name for an enum that is used to select which methods of the range to handle.
>
> Current ideas are found in the PR. please have a look and give comments.
I don't like RangeMethod because the term ‘Method’ is not used by
the language documentation, which only uses the term ‘member
function’. Some range primitives aren't necessarily functions
either. What about RangePrimitive?
|
December 28, 2014 Re: Ranges and Exception handling PR 2724 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Pankrath | On 12/28/2014 7:49 AM, Tobias Pankrath wrote:
> On Saturday, 27 December 2014 at 22:14:41 UTC, Robert burner
> Schadek wrote:
>> On Saturday, 15 November 2014 at 01:43:07 UTC, Robert burner Schadek
>> wrote:
>>> This PR https://github.com/D-Programming-Language/phobos/pull/2724
>>> adds an generic way of handling Exception in Range processing.
>>> quickfur and Dicebot ask me to start a thread here so the concept
>>> could be discussed.
>>
>> We are currently searching for a name for an enum that is used to
>> select which methods of the range to handle.
>>
>> Current ideas are found in the PR. please have a look and give comments.
>
> I don't like RangeMethod because the term ‘Method’ is not used by
> the language documentation, which only uses the term ‘member
> function’. Some range primitives aren't necessarily functions
> either. What about RangePrimitive?
RangeAction?
|
Copyright © 1999-2021 by the D Language Foundation