1

Closed

Fix the use of Exceptions in PDOS

description

Use InvalidOperationException in PDOS when stream is closed.
Currently the Write() method throws NotSupportedException.
This seems wrong.
 
Also, instead of ArgumentException, use ArgumentOutOfRangeException when BufferSize is too small.
 
                throw new ArgumentOutOfRangeException("BufferSize",
                                                      "BufferSize must be greater than 1024 bytes");
 
Also, instead of NotImplementedException, use NotSupportedException for the builtin Stream methods.
 
Also, the Position_get seems like it could be supported, with the baseStream.Position. It need not throw NotSupportedException.
Closed Jun 13, 2011 at 3:22 PM by Cheeso
fixed in changeset 79029. First binary with this change: v1.9.1.6

comments