The Sleuth Kit Framework  4.1
Classes | Macros
TskException.h File Reference

Contains definition of Framework exception classes. More...

#include <stdexcept>
#include "tsk/framework/framework_i.h"

Classes

class  TskException
 Framework exception class. More...
 

Macros

#define TSK_DECLARE_EXCEPTION(CLS, BASE)
 
#define TSK_IMPLEMENT_EXCEPTION(CLS, BASE, NAME)
 

Detailed Description

Contains definition of Framework exception classes.

Based on techniques used in the Poco Exception class.

Macro Definition Documentation

#define TSK_DECLARE_EXCEPTION (   CLS,
  BASE 
)
Value:
class TSK_FRAMEWORK_API CLS: public BASE \
{ \
public: \
CLS(int code = 0); \
CLS(const std::string& msg, int code = 0); \
CLS(const CLS& exc); \
~CLS() throw(); \
CLS& operator = (const CLS& exc); \
const char* name() const throw(); \
const char* className() const throw(); \
};
#define TSK_IMPLEMENT_EXCEPTION (   CLS,
  BASE,
  NAME 
)
Value:
CLS::CLS(int code): BASE(code) \
{ \
} \
CLS::CLS(const std::string& msg, int code): BASE(msg, code) \
{ \
} \
CLS::CLS(const CLS& exc): BASE(exc) \
{ \
} \
CLS::~CLS() throw() \
{ \
} \
CLS& CLS::operator = (const CLS& exc) \
{ \
BASE::operator = (exc); \
return *this; \
} \
const char* CLS::name() const throw() \
{ \
return NAME; \
} \
const char* CLS::className() const throw() \
{ \
return typeid(*this).name(); \
} \

Copyright © 2011-2013 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.