Use new exception classes

Change-Id: I0d13b7c88338b92768bac6416bc091adb27100df