Added a more comprehensive and logical error handling system in baculua_errors.h.