nim-chronos/chronos/transports
Jacek Sieka f5ff9e32ca
introduce asyncraises in transports/asyncsync (#470)
With these fixes, `transports`/`asyncsync` correctly propagate and document their raises information - generally, most transport functions (send etc) raise `TransportError` and `CancelledError` - `closeWait` is special in that it generally doesn't fail.

This PR introduces the syntax `Future[void].Raises([types])` to create the `InternalRaisesFuture` type with the correct encoding for the types - this allows it to be used in user code while retaining the possibility to change the internal representation down the line.

* introduce raising constraints on stream callbacks - these constraints now give a warning when called with a callback that can raise exceptions (raising callbacks would crash 
* fix fail and its tests, which wasn't always given a good generic match
* work around nim bugs related to macro expansion of generic types
* make sure transports raise only `TransportError`-derived exceptions (and `CancelledError`)
2023-11-15 09:38:48 +01:00
..
common.nim introduce asyncraises in transports/asyncsync (#470) 2023-11-15 09:38:48 +01:00
datagram.nim introduce asyncraises in transports/asyncsync (#470) 2023-11-15 09:38:48 +01:00
ipnet.nim clean up `Defect` (#404) 2023-06-05 22:21:50 +02:00
osnet.nim Fix unreachable code places. (#459) 2023-10-30 15:27:25 +02:00
stream.nim introduce asyncraises in transports/asyncsync (#470) 2023-11-15 09:38:48 +01:00