srecord  1.65.0
exception.h
Go to the documentation of this file.
1 //
2 // srecord - manipulate eprom load files
3 // Copyright (C) 2000, 2002, 2003, 2006-2008, 2010, 2011 Peter Miller
4 //
5 // This program is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or (at
8 // your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef SRECORD_QUIT_EXCEPTION_H
20 #define SRECORD_QUIT_EXCEPTION_H
21 
22 #include <srecord/quit.h>
23 
24 namespace srecord
25 {
26 
27 /**
28  * The quit_exception class is use to represent a quit handler which
29  * throws an exception, rather than call global exit.
30  */
32  public quit
33 {
34 public:
35  /**
36  * The destructor.
37  */
38  virtual ~quit_exception();
39 
40  /**
41  * The default constructor.
42  */
44 
45  /**
46  * the vomit class is used for the throw.
47  */
48  class vomit { };
49 
50 protected:
51  // see base class for documentation
52  virtual void exit(int n);
53 
54  // see base class for documentation
55  virtual void message_v(const char *fmt, va_list);
56 
57 private:
58  /**
59  * The copy constructor. Do not use.
60  */
62 
63  /**
64  * The assignment operator. Do not use.
65  */
66  quit_exception &operator=(const quit_exception &);
67 };
68 
69 };
70 
71 #endif // SRECORD_QUIT_EXCEPTION_H
the vomit class is used for the throw.
Definition: exception.h:48
The quit_exception class is use to represent a quit handler which throws an exception,...
Definition: exception.h:33
virtual void exit(int n)
The exit method is used to terminate execution.
virtual ~quit_exception()
The destructor.
virtual void message_v(const char *fmt, va_list)
The message_v method is used to send an error message to a suitable destination.
quit_exception()
The default constructor.
The quit class is an abstract class for reporting error messages, both fatal and non-fatal.
Definition: quit.h:33