File: nothrow

package info (click to toggle)
foundry 0.0.20130809-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 632 kB
  • ctags: 2,340
  • sloc: cpp: 6,376; yacc: 366; makefile: 192; lex: 184
file content (46 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download
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
Description: Add nothrow dtors to exceptions
Author: Simon Richter <sjr@debian.org>
Last-Update: 2013-08-09

--- foundry-0.0.20130809.orig/lang/errors.h
+++ foundry-0.0.20130809/lang/errors.h
@@ -12,6 +12,7 @@ class internal_error :
 public:
         internal_error(std::string const &msg) :
                 std::runtime_error("internal error: " + msg) { }
+        virtual ~internal_error() throw() { }
 };
 
 class input_error :
@@ -19,6 +20,7 @@ class input_error :
 {
 public:
         input_error(std::string const &msg) : std::logic_error(msg) { }
+        virtual ~input_error() throw() { }
 };
 
 class unknown_production :
@@ -26,6 +28,7 @@ class unknown_production :
 {
 public:
         unknown_production() : input_error("unknown production") { }
+        virtual ~unknown_production() throw() { }
 };
 
 class unhandled_directive :
@@ -35,6 +38,7 @@ public:
         unhandled_directive(std::string const &directive) :
                 input_error("unhandled directive " + directive),
                 directive(directive) { }
+        virtual ~unhandled_directive() throw() { }
         std::string const directive;
 };
 
@@ -45,6 +49,7 @@ public:
         duplicate_rule(std::string const &rule) :
                 input_error("duplicate rule " + rule),
                 rule(rule) { }
+        virtual ~duplicate_rule() throw() { }
         std::string const rule;
 };