what is the diff b/w error and exceptions

Answer Posted / sivakumar kasa

In any programming language there can be three kinds of errors.

1. "Syntax Errors":

The mistakes done while writing statements. For
example, instead of "WRITE", if you type "WIRTE" it is a
syntax error.Compiler can detect these types of errors. You
will not able to be run the program till these errors are
rectified.

2. "Runtime Errors (Exceptions)":

Runtime Errors are thrown when the situation occurs
during execution of program where the system will not
know how to deal with such situation. For example, you have
written a program that takes an excel file and reads the
data and stores in the database. You have done the program
perfectly. No syntax errors.But while executing the
program, if the user enters a filename that does not exist,
the program will not know what to do next, at that time
runtime error occurs. Runtime error terminates the
execution of the program abruptly. Runtime errors mostly
occur due to incorrect user entries or improper usage of
system resources by program. These runtime errors can be
avoided if we catch the exceptions. You can handle every
possible exception and throw user defined messages during
the execution and avoid abrupt termination of the program.

3. " Logical Errors":

Logical errors are obviously the mistake done in the
logic by programmer. For example, Value = Rate - Discount
is the normal universal calculation. By mistake if you have
typed Value = Rate + Discount, it is neither syntax error
nor runtime error. Your program is successful but result is
wrong.
NOTE: This can be corrected only through thorough
study of the program or worst case debugging.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

PLEASE HELP ANYONE ON THIS ISSUE,is there any problem with this function module :RHPQ_T77BX_ADD_QUALIS_OF_DPLAN. IT IS TRIGGERING BEFORE COMPLETION OF THE DEVELOPMENT PLAN but it has to trigger after compltion of development plan..this issue raised in my project..so reply urgently..thanks in advance..

1665


What are the difference between pool tables and transparent tables?

637


How to pass data from list to report?

576


Difference between .Include and .append?

750


Difference between call by value and call by reference? : abap data dictionary

611






What primary key and foreign key relationship

892


What is the reserve command?

672


What are the classifications of the sap abap data classes?

616


Can a domain, assigned to a data element be changed? : abap data dictionary

554


Explain how to create any functions?

601


What is a 'z' report?

653


What are the data types of the external layer?

586


What is the purpose of creating symbolic a/c, what is transaction code for same? Can we assign one symbolic a/c to multiple wage types? : sap abap hr

604


1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?

1469


What is processing class, where we do them and why? : sap abap hr

581