source: pacpusframework/trunk/include/Pacpus/kernel/PacpusException.h@ 284

Last change on this file since 284 was 284, checked in by Marek Kurdej, 10 years ago

Fixed: Unix problem with exceptions, missing #include <stdexcept>

File size: 1.3 KB
Line 
1// %pacpus:license{
2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
4// %pacpus:license}
5/// @file
6/// @author Marek Kurdej <firstname.surname@utc.fr>
7/// @date June, 2013
8/// @version $Id$
9/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
10/// @brief Brief description.
11///
12/// Detailed description.
13
14#ifndef DEF_PACPUS_PACPUSEXCEPTION_H
15#define DEF_PACPUS_PACPUSEXCEPTION_H
16
17#include <Pacpus/kernel/PacpusLibConfig.h>
18
19#include <boost/exception/exception.hpp>
20#include <boost/exception/error_info.hpp>
21#include <stdexcept>
22#include <string>
23
24#ifdef _MSC_VER
25# pragma warning(push)
26# pragma warning(disable: 4251 4275)
27#endif // _MSC_VER
28
29namespace pacpus
30{
31
32/// Base class for all exceptions in the framework
33class PACPUSLIB_API PacpusException
34 : /*virtual*/ public std::runtime_error
35 , virtual public boost::exception
36{
37public:
38 /// Ctor.
39 /// @param what Information about the exception.
40 PacpusException(std::string const& what = "");
41
42 /// Dtor.
43 virtual ~PacpusException() throw();
44};
45
46} // namespace pacpus
47
48typedef boost::error_info<struct tag_errinfo_signal, int> errinfo_signal;
49
50#ifdef _MSC_VER
51# pragma warning(pop)
52#endif // _MSC_VER
53
54#endif // DEF_PACPUS_PACPUSEXCEPTION_H
Note: See TracBrowser for help on using the repository browser.