‎2008 Mar 27 9:06 AM
Hi buddies,
I was learning the new class-based exception handling, a question suddently jumped in my brain:what's the difference between the new concept and the old exception concept EXCEPTIONS
*\ conversion_error = 1
*\ file_open_error = 2
*\ file_read_error = 3
*\ invalid_type = 4
*\ no_batch = 5
*\ unknown_error = 6
*\ invalid_table_width = 7
*\ gui_refuse_filetransfer = 8
*\ customer_error = 9
*\ OTHERS = 10.
?
‎2008 Mar 27 9:17 AM
In class base exceptions you do not need to capture the return-code at once and after each call, cause sy-subrc might be overriden. Instead you can catch the exception at a central point in the try statement coding the error handling only once.
‎2008 Mar 27 9:19 AM
hi,
Go through this PDF, it will answer all your queries as to why the new class based exception is better.
Hope this helps, Do reward.
‎2008 Mar 27 9:19 AM
Classic exceptions are usually mapped to a SY-SUBRC as soon as they occur.
Class based exceptions create an object representing the exception occurred. This object then can have attributes containing further information specifying the exception. (just an example...)