1 // $Id: gc_errhandling.h,v 1.11 2011/03/07 06:08:47 bobgian Exp $
2 
3 /*
4   Copyright 2002 Peter Beerli, Mary Kuhner, Jon Yamato and Joseph Felsenstein
5 
6   This software is distributed free of charge for non-commercial use
7   and is copyrighted.  Of course, we do not guarantee that the software
8   works, and are not responsible for any damage you may cause or have.
9 */
10 
11 #ifndef GC_ERRHANDLING_H
12 #define GC_ERRHANDLING_H
13 
14 #include <stdexcept>
15 #include "wx/string.h"
16 
17 //------------------------------------------------------------------------------------
18 
19 class gc_ex : public std::exception
20 {
21   private:
22     gc_ex();    // undefined
23   protected:
24     wxString    m_what;
25     size_t      m_row;
26     wxString    m_fileName;
27   public:
28     gc_ex(wxString) throw();
29     virtual ~gc_ex() throw();
30 
31     bool    hasRow() const throw();
32     size_t  getRow() const throw();
33     void    setRow(size_t row) throw();
34     void    setRow(int row) throw();
35 
36     bool        hasFile()   const throw();
37     wxString    getFile()   const throw();
38     void        setFile(const wxString & s) throw();
39 
40     virtual const char* what () const throw();
41     virtual const wxString & wxWhat() const throw();
42 
43 };
44 
45 class gc_data_error : public gc_ex
46 {
47   public:
48     gc_data_error(const wxString & wh);
49     virtual ~gc_data_error() throw();
50 };
51 
52 class gc_implementation_error : public gc_ex
53 {
54   public:
55     gc_implementation_error(const wxString & wh);
56     virtual ~gc_implementation_error() throw();
57 };
58 
59 class gui_error : public gc_ex
60 {
61   public:
62     gui_error(const wxString & wh);
63     virtual ~gui_error() throw();
64 };
65 
66 class gc_abandon_export : public gc_ex
67 {
68   public:
69     gc_abandon_export() throw() ;
70     virtual ~gc_abandon_export() throw();
71 };
72 
73 class gc_fatal_error : public gc_ex
74 {
75   public:
76     gc_fatal_error();
77     virtual ~gc_fatal_error() throw();
78 };
79 
80 #endif  // GC_ERRHANDLING_H
81 
82 //____________________________________________________________________________________
83