File: string_exceptions

package info (click to toggle)
omniorb-dfsg 4.2.2-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 14,628 kB
  • sloc: cpp: 109,677; python: 24,939; ansic: 14,136; sh: 2,743; makefile: 96
file content (76 lines) | stat: -rw-r--r-- 3,167 bytes parent folder | download | duplicates (4)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Description: Remove string exceptions, they are unsupported in Python 2.6
 Python 2.6 accidentically removed string exceptions, and these where
 still used by the C++ backend of omniidl.
Bug-Debian: http://bugs.debian.org/585260
Forwarded: http://www.omniorb-support.com/pipermail/omniorb-dev/2010-July/000296.html
Author: Floris Bruynooghe <flub@devork.be>
Last-Update: 2010-08-08

--- a/src/lib/omniORB/omniidl_be/cxx/ast.py
+++ b/src/lib/omniORB/omniidl_be/cxx/ast.py
@@ -352,8 +352,8 @@
             if enum not in values: return 0
         return 1
 
-    raise "exhaustiveMatch type="+repr(type)+ \
-          " val="+repr(discrimvalue)
+    raise AssertionError("exhaustiveMatch type="+repr(type)+
+                         " val="+repr(discrimvalue))
 
 
 # Return the base AST node after following all the typedef chains
--- a/src/lib/omniORB/omniidl_be/cxx/dynskel/typecode.py
+++ b/src/lib/omniORB/omniidl_be/cxx/dynskel/typecode.py
@@ -376,8 +376,8 @@
 
     if isinstance(type, idltype.Base):
         util.fatalError("Internal error generating TypeCode data")
-        raise "Don't know how to generate TypeCode for Base kind = " +\
-              repr(type.kind())
+        raise AssertionError("Don't know how to generate TypeCode for"
+			     "Base kind = " + repr(type.kind()))
 
     if isinstance(type, idltype.String):
         return prefix + "string_tc(" + str(type.bound()) + tctrack + ")"
--- a/src/lib/omniORB/omniidl_be/cxx/impl/main.py
+++ b/src/lib/omniORB/omniidl_be/cxx/impl/main.py
@@ -244,7 +244,7 @@
                                        "::" + args)
             else:
                 util.fatalError("Internal error generating interface member")
-                raise "No code for interface member: " + repr(c)
+                raise AssertionError("No code for interface member: "+repr(c))
 
         # the class definition has no actual code...
         defs = string.join(map(lambda x:x + ";\n", declarations), "")
--- a/src/lib/omniORB/omniidl_be/cxx/types.py
+++ b/src/lib/omniORB/omniidl_be/cxx/types.py
@@ -793,7 +793,7 @@
         if d_T.void():
             raise NotImplementedError("No such thing as a void _var type")
 
-        raise "Unknown _var type, kind = " + str(d_T.kind())
+        raise AssertionError("Unknown _var type, kind = " + str(d_T.kind()))
 
     def out(self, ident):
         if self.is_basic_data_types():
@@ -826,7 +826,8 @@
         if d_T.enum() or d_T.void() or (self.is_basic_data_types()):
             return ""
 
-        raise "Don't know how to free type, kind = " + str(d_T.kind())
+        raise AssertionError("Don't know how to free type, kind = "
+			     + str(d_T.kind()))
 
     def copy(self, src, dest, environment = None):
         """Copies an entity from src to dest"""
@@ -861,7 +862,8 @@
         if d_T.enum() or self.is_basic_data_types():
             return dest + " = " + src + ";"
 
-        raise "Don't know how to copy type, kind = " + str(d_T.kind())
+        raise AssertionError("Don't know how to copy type, kind = "
+			     + str(d_T.kind()))
                
     def representable_by_int(self):
         """representable_by_int(types.Type): boolean