NCL Composer  0.1.5
 All Classes Functions Variables Pages
EntityNotFound.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef ENTITYNOTFOUND_H
11 #define ENTITYNOTFOUND_H
12 
13 #include <QString>
14 
15 #include <exception>
16 using namespace std;
17 
18 namespace composer{
19  namespace core {
20  namespace util {
21 
27 class EntityNotFound : public exception
28 {
29  private:
30  QString element;
31  QString id;
32  public:
39  EntityNotFound(QString _element, QString _id) :
40  element(_element), id(_id) {}
44  ~EntityNotFound() throw() {}
45 
49  const char* what() const throw() {
50  QString ret = "Entity (" + element + ") with id (" + id + ") not \
51  found!";
52  return ret.toStdString().c_str();
53  }
54 };
55 
56 }}}
57 #endif // ENTITYNOTFOUND_H