@@ -132,7 +132,6 @@ function rostypegen()
132
132
buildpackage (_rospy_imports[pkg])
133
133
end
134
134
end
135
- gentypes () = error (" gentypes() renamed to rostypegen()" )
136
135
137
136
# Reset type generation process to start over with @rosimport. Does not remove
138
137
# already generated modules! They will be replaced when rostypegen is called
@@ -144,7 +143,6 @@ function rostypereset()
144
143
empty! (_rospy_objects)
145
144
nothing
146
145
end
147
- cleartypes () = error (" cleartypes() renamed to rostypereset()" )
148
146
149
147
# Populate the module with a new message type. Import and add dependencies first
150
148
# so they will appear first in the generated code.
@@ -195,11 +193,8 @@ function _pyvars(modname::ASCIIString, typ::ASCIIString)
195
193
pyobj =
196
194
try pymod[typ]
197
195
catch ex
198
- if isa (ex, KeyError)
199
- throw (KeyError (" '$typ ' in package '$modname '" ))
200
- else
201
- rethrow (ex)
202
- end
196
+ isa (ex, KeyError) || rethrow (ex)
197
+ throw (KeyError (" '$typ ' in package '$modname '" ))
203
198
end
204
199
pymod, pyobj
205
200
end
@@ -626,11 +621,11 @@ _typedefault(::Type{Duration}) = Duration(0,0)
626
621
627
622
# Default method to get the "pkg/type" string from a generated DataType.
628
623
# Extended by the generated modules.
629
- _typerepr {T} ( :: Type{T} ) = error ( " Not a ROS type " )
624
+ function _typerepr end
630
625
631
- # Default method to get the request/response datatypes for a generated service
632
- _srv_reqtype {T} ( :: Type{T} ) = error ( " Not a ROS Service type " )
633
- _srv_resptype {T} ( :: Type{T} ) = error ( " Not a ROS Service type " )
626
+ # Default methods to get the request/response datatypes for a generated service
627
+ function _srv_reqtype end
628
+ function _srv_resptype end
634
629
635
630
# Accessors for the package name
636
631
_name (p:: ROSPackage ) = p. name
0 commit comments