1 #ifndef HL_CONTROL_ERROR_H 2 #define HL_CONTROL_ERROR_H 8 #include <QCoreApplication> 30 #define HL_EXPORT_OPEN_FILE_CODE -18 31 #define HL_EXPORT_OPEN_FILE_MSG "Could not open file %s!" 42 Q_DECLARE_TR_FUNCTIONS(Exception)
53 this->errorCode = errorCode;
95 return ControlException::tr(HL_OS_INIT_MSG);
98 return ControlException::tr(HL_PA_INIT_MSG);
100 case HL_OSX_DAEMON_INIT_CODE:
101 return ControlException::tr(HL_OSX_DAEMON_INIT_MSG);
103 case HL_OSX_DAEMON_CRASH_CODE:
104 return ControlException::tr(HL_OSX_DAEMON_CRASH_MSG);
106 case HL_OSX_PGREP_CODE:
107 return ControlException::tr(HL_OSX_PGREP_MSG);
109 case HL_OSX_EXEPATH_CODE:
110 return ControlException::tr(HL_OSX_EXEPATH_MSG);
112 case HL_OSX_EXEPATH_TRIM_CODE:
113 return ControlException::tr(HL_OSX_EXEPATH_TRIM_MSG);
115 case HL_DEVICE_NOT_FOUND_CODE:
116 return ControlException::tr(HL_DEVICE_NOT_FOUND_MSG);
118 case HL_PA_OPEN_STREAM_CODE:
119 return ControlException::tr(HL_PA_OPEN_STREAM_MSG);
121 case HL_PA_CLOSE_STREAM_CODE:
122 return ControlException::tr(HL_PA_CLOSE_STREAM_MSG);
124 case HL_PA_DEVICE_READ_STREAM_CODE:
125 return ControlException::tr(HL_PA_DEVICE_READ_STREAM_MSG);
127 case HL_PA_GET_DEVICES_CODE:
128 return ControlException::tr(HL_PA_GET_DEVICES_MSG);
130 case HL_CHECK_PARAMS_CODE:
131 return ControlException::tr(HL_CHECK_PARAMS_MSG);
133 case HL_LINUX_OPEN_DEVICE_CODE:
134 return ControlException::tr(HL_LINUX_OPEN_DEVICE_MSG);
136 case HL_RB_ALLOC_BUFFER_CODE:
137 return ControlException::tr(HL_RB_ALLOC_BUFFER_MSG);
139 case HL_RB_INIT_BUFFER_CODE:
140 return ControlException::tr(HL_RB_INIT_BUFFER_MSG);
142 case HL_EXPORT_OPEN_FILE_CODE:
143 return ControlException::tr(HL_EXPORT_OPEN_FILE_MSG);
146 return QString(ControlException::tr(
"Unknown error code: %1").arg(code));
152 #endif // END HL_CONTROL_ERROR_H ControlException(int errorCode)
Constructor of ControlException.
Definition: HulaControlError.h:51
const std::string getErrorMessage() const
This method returns the error message that corresponds to the error code in the locale given by the a...
Definition: HulaControlError.h:62
<hlaudio/internal/HulaAudioError.h>This file is automatically included via hlaudio.h
Wrapper around translation functions for Qt.
Definition: Controller.h:10
int getErrorCode() const
This method returns the error code.
Definition: HulaControlError.h:72
Exception class for the control module and higher.
Definition: HulaControlError.h:40
QString getTranslatedErrorMessage(int)
Retrieve the description associated with a given error code.
Definition: HulaControlError.h:90