keneanung / mudlet-msp

This is an implementation of the MUD Sound Protocol for Mudlet
GNU General Public License v3.0
4 stars 0 forks source link

Figure a consistent way of error handling #14

Open keneanung opened 6 years ago

keneanung commented 6 years ago

While the usual lua idion is returning nil and an error messages in case of an error, this does not always work (like in constructors).

We should definitely use this scheme in the interface (the static MSP class) and we should handle this on the Mudlet side appropriately.

Inside the library I'd like avoid the nil checks and so on. There are sme options:

We need to evaluate pros and cons of each option and eventually we should choose a single option to be consistent.