jamesmh / coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!

Home Page:https://docs.coravel.net/Installation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding a More Descriptive Exception for Invalid Driver Error

RaulShinaede opened this issue · comments

When an incorrect driver type is specified in the appsettings, a generic KeyNotFound error is thrown, which can lead to confusion. Below is the result of the error:

error-coravel

To fix this, I replaced the usage of the collection in the .addMailer extension with a switch statement that throws a more descriptive exception.

error-coravel-ajust