SoundBand/Sync/exaptions.cpp
2018-08-17 16:06:14 +03:00

78 lines
1.8 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.

#include "exaptions.h"
#ifdef LOGER
Log debug_log(LOG_FILE);
#endif
const char *BaseException::what() {
return _what.toLatin1().data();
}
void BaseException::log() const{
#ifdef LOGER
debug_log.write(_what, ERROR);
#endif
return;
}
MediaException::MediaException(){
_what = QObject::tr("Your operating system or platform has not supported media files.");
log();
}
AddNodeExaption::AddNodeExaption(){
_what = QObject::tr("Address not available");
log();
}
initNodeError::initNodeError(){
_what = QObject::tr("The node on this device could not be deployed.");
log();
}
CreatePackageExaption::CreatePackageExaption(){
_what = QObject::tr("Сould not generate network packet");
log();
}
SyncCountError::SyncCountError(){
_what = QObject::tr("Could not sync audio.");
log();
}
BadAnswerExaption::BadAnswerExaption(){
_what = QObject::tr("could not parse message nodes.");
log();
}
BrodcastConflict::BrodcastConflict(){
_what = QObject::tr("The server received the packet from the server.");
log();
}
SyncError::SyncError(){
_what = QObject::tr("The playlist is empty, the player has nothing to play.");
log();
}
InitDBError::InitDBError(){
_what = QObject::tr("Error creating database.");
log();
}
NetworkError::NetworkError(){
_what = QObject::tr("There was an error on the socket, the connection will be closed.");
log();
}
DataBaseError::DataBaseError(){
_what = QObject::tr("Find duplicate of database item.");
log();
}
NotSupported::NotSupported(){
_what = QObject::tr("This option not supported.");
log();
}