Raggaer / castro

High performance content management system for Open Tibia servers
MIT License
46 stars 19 forks source link

Extension system #61

Closed forgee closed 7 years ago

forgee commented 7 years ago

Still much left to be done but base functionality is there for pages/widgets.

Raggaer commented 7 years ago

When loading extensions, why Errorf and no Fatalf?

forgee commented 7 years ago

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.

Raggaer commented 7 years ago

Good point. I will try to review more changes this week

Raggaer commented 7 years ago

Any news on this @forgee ?

Raggaer commented 7 years ago

I accidentally merged branches