influxdb-client-csharp
influxdb-client-csharp copied to clipboard
writeApi: extend example in README with EventHandler usage
It was totally not clear where to look for errors. I've seen a lot of questions in internet asking the same thing. Having EventHandler in README will give this understanding right away. writeApi.EventHandler += (sender, eventArgs) => { if ( e is WriteErrorEvent @ev1 ) { throw new Exception( @ev1.Exception.Message ); } if ( e is WriteRuntimeExceptionEvent @ev2 ) { throw new Exception( ev2.Exception.Message ); } };
Hi @TatianaInfoGuild,
thanks for using our client. We will take a look.
Regards
For more info about usage of EventHandler
see:
- https://github.com/influxdata/influxdb-client-csharp/tree/master/Client#handle-the-events
- https://github.com/influxdata/influxdb-client-csharp/blob/master/Examples/WriteEventHandlerExample.cs