Exception Classes
For all you C++, Java and .NET developers, the concept of exception classes, which is relatively new in ABAP, will be easy to understand.
Exception classes are, as their name imply, classes that define exceptions.
Exception classes are created in a manner similar to creating regular ABAP classes. You can create exception classes in SE80, but you choose “Exception class” as the class type.
Java developers are probably familiar with the concept of checked exceptions and unchecked exceptions. ABAP has this concept as well. As the ABAP documentation explains:
• “If exceptions defined via subclasses of CX_STATIC_CHECK are propagated from a procedure, they must be explicitly declared in the interface of the procedure. The syntax check makes a static check of whether all exceptions triggered in the procedure with RAISE EXCEPTION or declared in the interfaces of the calling procedures are either handled with CATCH or explicitly declared in the interface and issues a warning if this is not the case.”
• “If exceptions defined via subclasses of CX_DYNAMIC_CHECK are propagated from a procedure, they must be explicitly declared in the interface of the procedure. However, this is not checked statically by the syntax check; instead, it is checked dynamically at the point in time when such an exception is propagated from a procedure.”
• “Exceptions that are defined via subclasses of CX_NO_CHECK may not be explicitly declared in the interface of the procedure. The CX_NO_CHECK class and its subclasses are always implicitly declared and are always propagated, whereby resumability is retained if it exists.”
You can therefore see the first type is like checked exceptions, the second and third types have some similarities to unchecked exceptions.
You can find more about ABAP Exception Categories here. You can find more about ABAP exceptions in general here.
SAP SDN also has a good article explaining the difference between the old exception using method and the new one. You can access it here, but you need to have an SDN account in order to read it.