Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2783 by moorepa...@gmail.com: Error handling needs improvement if RigidBodies don't have an attribute set
http://code.google.com/p/sympy/issues/detail?id=2783

If there is a RigidBody object (or Particle, etc) that doesn't have all of it's attributes set correctly, it is hard to determine the error when calling Kane.kanes_equations()

For example if the mass is set to None in a Rigidbody the error from kanes_equations() is:

AttributeError: 'NoneType' object has no attribute 'subs'

The error should explicitly tell you that the mass is missing (or whatever other attribute is not there).

This is also a result of not requiring the user to specify all of the attributes of a RigidBody in it's __init__ method. The __init__ method should require the needed attributes and at least give the user a warning if they didn't supply all of the required attributes of a RigidBody.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to