trikRuntime
internalErrorException.h
Go to the documentation of this file.
1 /* Copyright 2015 CyberTech Labs Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QsLog.h>
18 
19 #include "trikRuntimeException.h"
20 
21 namespace trikKernel {
22 
25 {
26 public:
30  : mMessage(message)
31  {
32  QLOG_ERROR() << "Internal error:" << message;
33  }
34 
36  const QString &message() const
37  {
38  return mMessage;
39  }
40 
41 private:
42  const QString &mMessage;
43 };
44 
45 }
Definition: analogSensor.h:23
#define QLOG_ERROR()
Definition: QsLog.h:104
Base class for all exceptions in TRIKRuntime.
Definition: trikRuntimeException.h:22
InternalErrorException(const QString &message)
Constructor.
Definition: internalErrorException.h:29
Exception that is thrown when something is wrong with implementation of trikRuntime.
Definition: internalErrorException.h:24
const QString & message() const
Returns exception information.
Definition: internalErrorException.h:36