You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							43 lines
						
					
					
						
							773 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							43 lines
						
					
					
						
							773 B
						
					
					
				
								#ifndef HARDWAREEXCEPTION_H
							 | 
						|
								#define HARDWAREEXCEPTION_H
							 | 
						|
								
							 | 
						|
								#include <exception>
							 | 
						|
								#include <QString>
							 | 
						|
								
							 | 
						|
								#include "model/hardware/exception/HardwareExceptionTypes.h"
							 | 
						|
								
							 | 
						|
								class HardwareException : public std::exception
							 | 
						|
								{
							 | 
						|
								private:
							 | 
						|
								    quint32 _errId;
							 | 
						|
								    QString _innerMessage;
							 | 
						|
								
							 | 
						|
								public:
							 | 
						|
								    explicit HardwareException(quint32 errId)
							 | 
						|
								    {
							 | 
						|
								        _errId = errId;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    explicit HardwareException(quint32 errId, QString innerMessage)
							 | 
						|
								    {
							 | 
						|
								        _errId = errId;
							 | 
						|
								        _innerMessage = innerMessage;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    const char* what() const noexcept override
							 | 
						|
								    {
							 | 
						|
								        return _innerMessage.toUtf8();
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    QString getInnerMessage() const
							 | 
						|
								    {
							 | 
						|
								        return _innerMessage;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    quint32 errId() const
							 | 
						|
								    {
							 | 
						|
								        return _errId;
							 | 
						|
								    }
							 | 
						|
								};
							 | 
						|
								
							 | 
						|
								#endif //HARDWAREEXCEPTION_H
							 | 
						|
								
							 |