Skip to content

StringSplitter Exceptions #19

@rgomez90

Description

@rgomez90

The method StringSplitter.SplitTextIntoChunks raises exception by a null input string or for maxChunkSize < 1.

This exceptions will not be raised "directly".

Example:

//Passing a null string will raise an ArgumentException
var chunks = StringSplitter.SplitTextIntoChunks(null, 250, false);
var firstChunk = chunks.First();    //Exception will be raised here!!!!

The exceptions will be raised first when accessing the enumerable, due to the enumerator nature of the method.

I am not sure if this is the intended behaviour, since I would expect the exception to be raised when calling StringSplitter.SplitTextIntoChunks(null, 250, false)

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions