MPEG CDVA Experimentation Model (CXM)  1.0
Compact Descriptors for Visual Analisys
CdvaException.h
Go to the documentation of this file.
1 /*
2 The copyright in this software is being made available under this MPEG Reference Software Copyright License. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.
3 
4 Copyright (c) 2016, Telecom Italia
5 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 * Neither the name of Telecom Italia nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 */
11 
12 #pragma once
13 
14 #include <exception>
15 #include <string>
16 
17 namespace mpeg7cdva
18 {
19 
20 
24 class CdvaException : public std::exception {
25 private:
26  std::string message;
27 
28 public:
33  CdvaException(std::string str) : message(str)
34  {}
35 
36  virtual ~CdvaException() throw () // no exception allowed here
37  {}
38 
42  const char* what() const throw() // no exception allowed here
43  {
44  return message.c_str();
45  }
46 };
47 
48 } // end of namespace
Namespace used to encapsulate all MPEG-7 CDVA declarations.
Definition: Buffer.h:14
virtual ~CdvaException()
Definition: CdvaException.h:36
const char * what() const
Get the exception message.
Definition: CdvaException.h:42
Class defining a specific exception for CDVA.
Definition: CdvaException.h:24
CdvaException(std::string str)
Create a new CDVA exception.
Definition: CdvaException.h:33