Closed forgee closed 7 years ago
When loading extensions, why Errorf
and no Fatalf
?
I tried to view it from a user's perspective. Let's say you are new to Castro and install an extension made by someone else from the admin page. Then it turns out that the extension contains an error that prevents it from being loaded.
Now, if the app throws Fatalf
, you can not start Castro at all to remove/disable the extension again. In order to be able to start Castro again, you would have to manually remove the entries from the database.
Using Errorf
the extension will not work, but you can still start the app normally. This way you will be able to remove the extension again using the UI.
I think for someone who is not familiar with how the system works, it is a crucial difference.
Perhaps we could add another install status and have the UI mark the extension as "broken" when that happens, to make it more obvious. If you really think it should be Fatalf
I will change it.
Good point. I will try to review more changes this week
Any news on this @forgee ?
I accidentally merged branches
Still much left to be done but base functionality is there for pages/widgets.