Handle Exceptions
Create your own Exception Handler
- Create a Public Instance Class
- Implement the interface
ITickerExceptionHandler
csharp
public class TickerExceptionHandler : ITickerExceptionHandler
{
public Task HandleExceptionAsync(Exception exception, Guid tickerId, TickerType tickerType)
{
// Your Exception Handling logic...
}
}
Register your Exception Handler
- After creating and implementing your
ExceptionHandler
class you should add it atTickerQ
Config.
csharp
....
services.AddTicker(opt =>
{
opt.SetExceptionHandler<TickerExceptionHandler>();
});