Add initial version of qes_error.[ch]

Initial error handling functions