debugged a crash, keys are now fetching, refactored main, added some exceptions instead of ints, debugged termination process

This commit is contained in:
Blue 2023-03-11 19:46:23 +03:00
parent 927bdf0dab
commit 4b68da458f
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
9 changed files with 321 additions and 130 deletions

View file

@ -19,6 +19,7 @@
#include <list>
#include <set>
#include <string>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
@ -30,6 +31,7 @@
#include <shared/vcard.h>
#include <shared/info.h>
#include <shared/exception.h>
#include "job.h"
@ -121,6 +123,25 @@ private:
std::map<QString, Job::Id> requestedBundles;
#endif
QString ownJid;
public:
class UnexpectedJobType: public Utils::Exception {
public:
UnexpectedJobType(Job::Type p_type, const std::string& p_method = "");
std::string getMessage() const override;
private:
Job::Type type;
std::string method;
};
class JobNotFound: public Utils::Exception {
public:
JobNotFound(Job::Id p_id, const std::string& p_method = "");
std::string getMessage() const override;
private:
Job::Id id;
std::string method;
};
};
}