Add engine internal error macro mjERROR to prepend calling function to error function.
PiperOrigin-RevId: 541584847 Change-Id: I57447e64375413ee07aa96372a402e1ced59ff4a
This commit is contained in:
committed by
Copybara-Service
parent
c9e9cd8b35
commit
ac1f41160d
@@ -926,7 +926,8 @@ Euler integrator, semi-implicit in velocity.
|
||||
|
||||
def test_can_raise_error(self):
|
||||
self.data.pstack = self.data.nstack
|
||||
with self.assertRaisesRegex(mujoco.FatalError, r'\Astack overflow'):
|
||||
with self.assertRaisesRegex(mujoco.FatalError,
|
||||
r'\Amj_stackAlloc: stack overflow'):
|
||||
mujoco.mj_forward(self.model, self.data)
|
||||
|
||||
def test_mjcb_time(self):
|
||||
|
||||
@@ -369,8 +369,8 @@ class MuJoCoRolloutTest(parameterized.TestCase):
|
||||
ctrl = np.zeros((3, model.nu))
|
||||
|
||||
model.opt.solver = 10 # invalid solver type
|
||||
with self.assertRaisesWithLiteralMatch(mujoco.FatalError,
|
||||
'Unknown solver type 10'):
|
||||
with self.assertRaisesWithLiteralMatch(
|
||||
mujoco.FatalError, 'mj_fwdConstraint: unknown solver type 10'):
|
||||
state, sensordata = rollout.rollout(model, data, initial_state, ctrl)
|
||||
|
||||
def test_invalid(self):
|
||||
|
||||
Reference in New Issue
Block a user