Use Cpp{Enable,Disable}Exceptions macro

Change-Id: I37bccd988004653375e06cb4040a20d6be988b13
(cherry picked from commit 58c659327f6a7ac463d5a885365ad429678ca2b3)
Merge "Use Cpp{Enable,Disable}Exceptions macro" into R1.10