summaryrefslogtreecommitdiff
path: root/src/msvc6/testpluginrunner/TestPlugInException.h
blob: 15005dcbcf3e7c387f5af153231286f3d6e64fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// //////////////////////////////////////////////////////////////////////////
// Header file TestPlugInException.h for class TestPlugInException
// (c)Copyright 2000, Baptiste Lepilleur.
// Created: 2001/06/23
// //////////////////////////////////////////////////////////////////////////
#ifndef TESTPLUGINEXCEPTION_H
#define TESTPLUGINEXCEPTION_H

#include <stdexcept>
#include <string>


/*! \class TestPlugInException
 * \brief This class represents a failure of using the test plug-in.
 */
class TestPlugInException : public std::runtime_error
{
public:
  enum Cause
  {
    failedToLoadDll =0,
    failedToCopyDll,
    failedToGetInterfaceFunction,
    failedToMakeTest
  };

  /*! Constructs a TestPlugInException object.
   */
  TestPlugInException( std::string message, 
                       Cause cause );

  /*! Copy constructor.
   * @param copy Object to copy.
   */
  TestPlugInException( const TestPlugInException &copy );

  /*! Destructor.
   */
  virtual ~TestPlugInException();

  /*! Copy operator.
   * @param copy Object to copy.
   * @return Reference on this object.
   */
  TestPlugInException &operator =( const TestPlugInException &copy );

  Cause getCause() const;

private:
  Cause m_cause;
};



// Inlines methods for TestPlugInException:
// ----------------------------------------



#endif  // TESTPLUGINEXCEPTION_H