Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
We now have a much simplified error system. It would be nice if these errors/warnings are better integrated in python/lua, e.g. by providing exception classes that can be thrown from plugins and/or can be caught from failing kdbGet/kdbSet.
See also doc/tutorials/language-bindings.md
Maybe make first a proposal how to do it before implementing something.
If python plugins should be able to throw errors the cpp bindings need exception classes. So someone (def. not me) needs to generate these C++ exception classes during build time. And we definitely need to intergrate the generated helpers which fills the exception payload (the error key) into the exception classes.
After this is done the python plugin can be extended to catch the base exception and extract the errorkey payload.
Regarding kdb open/get/set/close: Should be implemented in the cpp bindings. After step 1. python will automatically pick it up.
Lua doesn't support any kind of exceptions at all.
@Piankero can you create the C++ exception classes for our errors (as decided manually) and an exception creator (which creates the correct exceptions based on error type)?
If you need any help, please open a new issue. It should be quite straight forward (only minimal classes extending from KDBError). Btw. I am very open to drop the idea of USER_DEFINED_EXCEPTIONS, they are too complicated once we have a hierarchy of exceptions.