libpsynth 0.2.1
Classes | Namespaces | Defines | Functions
/home/raskolnikov/dev/psynth/trunk/src/psynth/base/exception.hpp File Reference
#include <exception>
#include <string>
Include dependency graph for exception.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  psynth::base::exception
 Base class for all the exceptions inside the framework. More...
class  psynth::base::error_base
 A base clase for the errors defined with PSYNTH_DECLARE_ERROR and alike preprocessor commands. More...

Namespaces

namespace  psynth
namespace  psynth::base

Defines

#define PSYNTH_DECLARE_ERROR(d_parent, d_error)
#define PSYNTH_DEFINE_ERROR_WHERE_WHAT(d_error, d_where, d_what)
#define PSYNTH_DEFINE_ERROR_WHERE(d_error, d_where)
#define PSYNTH_DEFINE_ERROR_WHAT(d_error, d_what)
#define PSYNTH_DEFINE_ERROR(d_error)

Functions

int psynth::base::default_error_level () throw ()
 psynth::base::PSYNTH_DECLARE_ERROR (error_base, error)

Define Documentation

#define PSYNTH_DECLARE_ERROR (   d_parent,
  d_error 
)
Value:
class d_error : public d_parent                                 \
    {                                                                   \
    public:                                                             \
        typedef d_parent base_type;                                     \
        d_error () {}                                                   \
        d_error (const std::string& s) : base_type (s) {}               \
        virtual const char* where () const throw ();                    \
    protected:                                                          \
        virtual const char* default_what () const throw ();             \
    };
#define PSYNTH_DEFINE_ERROR (   d_error)
Value:
const char* d_error::default_what () const      throw ()                \
    { return base_type::default_what (); }                              \
    const char* d_error::where () const throw ()                        \
    { return PSYNTH_MODULE_NAME; }
#define PSYNTH_DEFINE_ERROR_WHAT (   d_error,
  d_what 
)
Value:
const char* d_error::default_what () const throw ()                     \
    { return d_what; }                                                  \
    const char* d_error::where () const throw ()                        \
    { return PSYNTH_MODULE_NAME; }
#define PSYNTH_DEFINE_ERROR_WHERE (   d_error,
  d_where 
)
Value:
const char* d_error::default_what () const throw ()                     \
    { return base_type::default_what (); }                              \
    const char* d_error::where () const throw ()                        \
    { return d_where; }                                                 \
#define PSYNTH_DEFINE_ERROR_WHERE_WHAT (   d_error,
  d_where,
  d_what 
)
Value:
const char* d_error::where () const     throw ()                        \
    { return d_where; }                                                 \
    const char* d_error::default_what () const throw ()                 \
    { return d_what; }