Skip to content

Warn/raise when passing incompatible objects to log#3727

Merged
emilk merged 3 commits into
mainfrom
jleibs/improve_log_error
Oct 7, 2023
Merged

Warn/raise when passing incompatible objects to log#3727
emilk merged 3 commits into
mainfrom
jleibs/improve_log_error

Conversation

@jleibs
Copy link
Copy Markdown
Contributor

@jleibs jleibs commented Oct 6, 2023

What

Before:

transform3d_simple.py:11: RerunWarning: log: TypeError('TranslationAndMat3x3' object is not iterable)
  rr.log("base/translated", rr.TranslationAndMat3x3(translation=[1, 0, 0]))

After:

transform3d_simple.py:11: RerunWarning: log: TypeError(Expected an object implementing rerun.AsComponents or an iterable of rerun.ComponentBatchLike, but got <class 'rerun.datatypes.translation_and_mat3x3.TranslationAndMat3x3'> instead.)
  rr.log("base/translated", rr.TranslationAndMat3x3(translation=[1, 0, 0]))

Checklist

@jleibs jleibs added this to the 0.9.1 milestone Oct 6, 2023
@jleibs jleibs marked this pull request as ready for review October 6, 2023 18:32
@jleibs jleibs force-pushed the jleibs/improve_log_error branch from 0a1d687 to 379b347 Compare October 6, 2023 19:11
Copy link
Copy Markdown
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good error messages ❤️

@emilk emilk merged commit 25f157f into main Oct 7, 2023
@emilk emilk deleted the jleibs/improve_log_error branch October 7, 2023 11:38
@emilk emilk changed the title Warn/raise when passing incompatible objects to log Warn/raise when passing incompatible objects to log Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logging TranslationAndMat3x3 / TranslationRotationScale3D fails

2 participants