Handling Exception and use of CX_ROOT directly and subclasses


It is not advisable to use CX_ROOT directly and you would require using one of its direct subclasses. Also, the propagation depends upon the exception subclass hierarchy.

  • Subclasses of CX_STATIC_CHECK – these do not propagate automatically. You will need to do the handling yourself or there will be a syntax error in the program.
  • Subclasses of CX_DYNAMIC_CHECK – these do not require any handling. But the program that does not handle the exception will be aborted with these subclasses.
  • Subclasses of CX_NO_CHECK – These will get propagated automatically if the exception is not handled.

Updated on: 14-Feb-2020

171 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements