Skip to content

Commit 78d4fbb

Browse files
committed
enhance error reporting for frame metadata in render function
1 parent 0d65c57 commit 78d4fbb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/Render.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function render(model, sol,
331331
elseif get(md, Multibody.PlanarMechanics.IsFrame2D, false)
332332
points = get_trans_2d(sol, frame, tvec) |> Matrix
333333
else
334-
error("Got fishy frame metadata")
334+
error("Got fishy frame metadata", md)
335335
end
336336
Makie.lines!(scene, points)
337337
end
@@ -402,12 +402,12 @@ function render(model, sol, time::Real;
402402
for frame in traces
403403
md = get_metadata(frame)
404404
(md !== nothing) || error("Only frames can be traced in animations.")
405-
if get(md, :frame, false)
405+
if get(md, Multibody.ModelingToolkit.IsFrame, false)
406406
points = get_trans(sol, frame, tvec) |> Matrix
407-
elseif get(md, :frame_2d, false)
407+
elseif get(md, Multibody.PlanarMechanics.IsFrame2D, false)
408408
points = get_trans_2d(sol, frame, tvec) |> Matrix
409409
else
410-
error("Got fishy frame metadata")
410+
error("Got fishy frame metadata", md)
411411
end
412412
Makie.lines!(scene, points)
413413
end

0 commit comments

Comments
 (0)