SoundBand/sync/exaptions.h
2018-01-19 17:55:07 +03:00

107 lines
2.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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