ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

Suggestion: FCNPC_OnPluginError callback #157

Closed Yousha closed 6 years ago

Yousha commented 6 years ago

I think its good idea if we have FCNPC_OnPluginError callback to track runtime/plugin errors... like other plugins such Streamer

WoutProvost commented 6 years ago

What errors are you thinking about?

Regarding the errors that are currently print out to the console (with the [FCNPC] Error prefix), most of them are not 'runtime' errors, but errors that should be resolved when the script is being written. So that defeats the purpose of this new callback.

Regarding internal errors, the user doesn't really have much benefit with those. There is already a crashlog feature in place that users don't really know how to interpret, so adding another similar thing to that will only add to the confusion.

Regarding input validation, I can see this as the prime use for a feature like this. However, I'm honestly not that interested, since I haven't seen many people post on the forums with questions regarding why xyz didn't work. You can already detect if something went wrong with the natives based on the return values (e.g. FCNPC_Create returns INVALID_PLAYER_ID if it failed).

Yousha commented 6 years ago

Plugin related errors, anything

ziggi commented 6 years ago

I'm not interested in this feature. But you can make a PR.