jamesmh / coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
https://docs.coravel.net/Installation/
MIT License
3.63k stars 243 forks source link

Adding a More Descriptive Exception for Invalid Driver Error #348

Open RaulShinaede opened 8 months ago

RaulShinaede commented 8 months ago

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