Add some tests with herited exception classes and throwing a base class.

Change-Id: Ibd2aa4100fa103c150dcdcbc31ea7336a83de6c7