serial
serial copied to clipboard
Need examples to show error case handling
With changing to extending stream, it's now non-obvious how to handle error cases.
The spec is lacking examples to show how to handle:
- [ ] disconnection
- [ ] timeout
- [ ] Fail to open - wrong path,
- [ ] Fail to open - device in use,
- [ ] Fail to open - nsufficient permissions,
- [ ] Fail to open - improper parameters (e.g. baud rate not supported by hardware)
- [ ] Buffer overflow / data lost due to reading too slowly
Fail to open -- wrong path, device in use, insufficient permissions, improper parameters (e.g. baud rate not supported by hardware)
Buffer overflow / data lost due to reading too slowly
Oki, captured above as todo.
Examples are also needed for stream error conditions such as a break condition or parity error.