Skip to content

Commit 3bc40c6

Browse files
committed
some cleanup
1 parent 86ef7fe commit 3bc40c6

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/gentypes.jl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ function rostypegen()
132132
buildpackage(_rospy_imports[pkg])
133133
end
134134
end
135-
gentypes() = error("gentypes() renamed to rostypegen()")
136135

137136
#Reset type generation process to start over with @rosimport. Does not remove
138137
#already generated modules! They will be replaced when rostypegen is called
@@ -144,7 +143,6 @@ function rostypereset()
144143
empty!(_rospy_objects)
145144
nothing
146145
end
147-
cleartypes() = error("cleartypes() renamed to rostypereset()")
148146

149147
#Populate the module with a new message type. Import and add dependencies first
150148
#so they will appear first in the generated code.
@@ -195,11 +193,8 @@ function _pyvars(modname::ASCIIString, typ::ASCIIString)
195193
pyobj =
196194
try pymod[typ]
197195
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'"))
203198
end
204199
pymod, pyobj
205200
end
@@ -626,11 +621,11 @@ _typedefault(::Type{Duration}) = Duration(0,0)
626621

627622
#Default method to get the "pkg/type" string from a generated DataType.
628623
#Extended by the generated modules.
629-
_typerepr{T}(::Type{T}) = error("Not a ROS type")
624+
function _typerepr end
630625

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
634629

635630
#Accessors for the package name
636631
_name(p::ROSPackage) = p.name

0 commit comments

Comments
 (0)