2017-11-11 14:03:14 +03:00
|
|
|
|
#ifndef EXAPTIONS_H
|
|
|
|
|
#define EXAPTIONS_H
|
|
|
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QTranslator>
|
|
|
|
|
/**
|
|
|
|
|
* @brief The MediaException class
|
|
|
|
|
*/
|
|
|
|
|
class MediaException:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("Your operating system or platform has not supported media files.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-24 21:17:41 +03:00
|
|
|
|
class AddNodeExaption:public std::exception
|
2017-11-18 01:29:14 +03:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("Address not available");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-27 22:59:59 +03:00
|
|
|
|
class initNodeError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("The node on this device could not be deployed.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-24 21:17:41 +03:00
|
|
|
|
class CreatePackageExaption:public std::exception
|
2017-11-22 20:05:53 +03:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("Сould not generate network packet");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-01-14 15:29:42 +03:00
|
|
|
|
class SyncCountError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("Could not sync audio.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-24 21:17:41 +03:00
|
|
|
|
class BadAnswerExaption:public std::exception
|
2017-11-22 20:05:53 +03:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("could not parse message nodes.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-24 21:17:41 +03:00
|
|
|
|
class BrodcastConflict:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("The server received the packet from the server.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class SyncError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("The playlist is empty, the player has nothing to play.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-27 02:01:47 +03:00
|
|
|
|
class InitDBError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
2017-12-13 22:40:29 +03:00
|
|
|
|
return QObject::tr("Error creating database.");
|
2017-11-27 02:01:47 +03:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-01-12 11:16:06 +03:00
|
|
|
|
class NetworkError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("There was an error on the socket, the connection will be closed.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-01-19 16:48:22 +03:00
|
|
|
|
class DataBaseError:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("Find duplicate of database item.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-01-19 17:55:07 +03:00
|
|
|
|
class NotSupported:public std::exception
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString what(){
|
|
|
|
|
return QObject::tr("This option not supported.");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2017-11-11 14:03:14 +03:00
|
|
|
|
#endif // EXAPTIONS_H
|