Open mheily opened 8 years ago
libjob needs to catch exceptions and gracefully error out, because otherwise it will kill the program in unusual ways.
Example:
static std::string get_user_datadir() { const char *home = getenv("HOME"); if (!home) { throw "Missing HOME directory environment variable"; }
Also, we should stop throwing std::strings, and start throwing custom exceptions that inherit from std::exception. It is very lame to have to catch both std::string AND std::exception everywhere.
libjob needs to catch exceptions and gracefully error out, because otherwise it will kill the program in unusual ways.
Example: