MCPcopy Index your code
hub / github.com/dropbox/dropbox-sdk-java / exception_class

Method exception_class

core/generator/java/java.stoneg.py:2072–2084  ·  view source on GitHub ↗
(self, element)

Source from the content-addressed store, hash-verified

2070 return JavaClass(data_type_class.fq + '.Serializer')
2071
2072 def exception_class(self, element):
2073 assert isinstance(element, (DataType, ApiRoute)), repr(element)
2074
2075 if isinstance(element, DataType):
2076 data_type = element
2077 assert self.data_type_has_exception(data_type), repr(data_type)
2078 return JavaClass(self.java_class(element).fq + 'Exception')
2079 else:
2080 route = element
2081 if self.has_error(route):
2082 return self.exception_class(route.error_data_type)
2083 else:
2084 return JavaClass('com.dropbox.core.DbxApiException')
2085
2086 def route_exception_class(self, route):
2087 assert isinstance(route, ApiRoute), repr(route)

Calls 4

java_classMethod · 0.95
has_errorMethod · 0.95
JavaClassClass · 0.85

Tested by

no test coverage detected