Index: tools/json_schema_compiler/cpp_type_generator.py |
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py |
index 9609f3529fb5fee970061926454b11ffa8bf8b87..04e008051368f5e67974a04463ea715b70428c08 100644 |
--- a/tools/json_schema_compiler/cpp_type_generator.py |
+++ b/tools/json_schema_compiler/cpp_type_generator.py |
@@ -32,7 +32,7 @@ class CppTypeGenerator(object): |
if qualified_name in self._type_namespaces: |
raise ValueError('Type %s is declared in both %s and %s' % |
(qualified_name, namespace.name, |
- self._type_namespaces[qualified_type].name)) |
+ self._type_namespaces[qualified_name].name)) |
self._type_namespaces[qualified_name] = namespace |
self._cpp_namespaces[namespace] = cpp_namespace |
@@ -213,7 +213,7 @@ class CppTypeGenerator(object): |
if type_name == self._QualifyName(namespace, ref_type): |
return namespace |
- raise ValueError('Cannot resolve %s to a type in any namespace.' % ref_type) |
+ return None |
def _NamespaceTypeDependencies(self): |
"""Returns a dict containing a mapping of model.Namespace to the C++ type |