mirror of
https://github.com/QuasarApp/SoundBand.git
synced 2025-04-28 16:24:32 +00:00
107 lines
2.0 KiB
C++
107 lines
2.0 KiB
C++
#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.");
|
||
}
|
||
};
|
||
|
||
class AddNodeExaption:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("Address not available");
|
||
}
|
||
};
|
||
|
||
class initNodeError:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("The node on this device could not be deployed.");
|
||
}
|
||
};
|
||
|
||
class CreatePackageExaption:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("Сould not generate network packet");
|
||
}
|
||
};
|
||
|
||
class SyncCountError:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("Could not sync audio.");
|
||
}
|
||
};
|
||
|
||
class BadAnswerExaption:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("could not parse message nodes.");
|
||
}
|
||
};
|
||
|
||
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.");
|
||
}
|
||
};
|
||
|
||
class InitDBError:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("Error creating database.");
|
||
}
|
||
};
|
||
|
||
class NetworkError:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("There was an error on the socket, the connection will be closed.");
|
||
}
|
||
};
|
||
|
||
class DataBaseError:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("Find duplicate of database item.");
|
||
}
|
||
};
|
||
|
||
class NotSupported:public std::exception
|
||
{
|
||
public:
|
||
QString what(){
|
||
return QObject::tr("This option not supported.");
|
||
}
|
||
};
|
||
|
||
#endif // EXAPTIONS_H
|