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

What is the difference between a structure and a table?

553


What is the advantage of structures?

584


Give 3 scenario of reporting due to which you require reporting help of ABAP consultant?

1671


What is value table?

580


What are Pull and Push Methods?

1777






Why are insert and append statement used in sap abap?

671


What two statements would be used to exchange data between programs using abap memory?

509


Why is pretty printer user in abap?

638


How to transfer data into line items using batch input session method? : abap bdc

587


What abap statement will trigger list generation?

623


What is abap dictionary or data dictionary? What is the transaction to access abap dictionary? : abap data dictionary

566


What is the difference between ABAP and HR ABAP

2981


What is meant by exclusive, not cumulative lock? : sap abap data dictionary

588


How many ways you can create table? : abap data dictionary

535


Explain read dataset in sap abap?

718