weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
610 stars 85 forks source link

Throw more actionable "Conflict" exceptions? #146

Open vemv opened 3 years ago

vemv commented 3 years ago

Hi James,

while using ragtime I experienced the following error message:

Conflict! Expected 20210722233700-add-foo but 20210727114336-add-bar was applied.

...while ultimately I was able to solve the underlying cause, I found it a bit frustrating how concise the exception was.

One could say, a great exception message of the "precondition" kind explains why a precondition was expected, and a suggested action or diagnostic.

In particular:

Cheers - V