am ca04f74a: Merge "Make sure the exception is a CommandException before casting it to one." into lmp-mr1-dev

* commit 'ca04f74a64d1d19b68bcb630a8fd221cc8a4ac25':
  Make sure the exception is a CommandException before casting it to one.