Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when creating a DataReader of an empty DataStream #91

Closed
priverop opened this issue Feb 25, 2019 · 1 comment
Closed

Exception when creating a DataReader of an empty DataStream #91

priverop opened this issue Feb 25, 2019 · 1 comment

Comments

@priverop
Copy link
Member

Is your feature request related to a problem? Please describe.
DataReader reader = new DataReader(stream);
If the stream is empty, it won't read anything and will have always the runtime error "Trying to read past the end of the stream".

Describe the solution you'd like
There should be an exception when creating a DataReader of an empty stream.

@priverop
Copy link
Member Author

After discussion with @pleonex: There will be cases where you want to declare a reader/writer of an empty stream, start writting and then reading. So an exception wouldn't be the best choice here.

However, after implementing #1 we could declare a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant