what is the diff b/w error and exceptions
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / jayati saha
I don't know the exact answer but I think error refers to
the bug which may be detected at run time or not ,may
produce an exceptional result or not.
i mean to say that it may be a syntax error, logical error
which may produce abstract result or not but exception are
the errors which are detected at run time .
so we can say that exception are nothing but runtime error,
if exception occurs then a program will be terminated
abnormally and immediately.
so we have to design exception handler, a block of code
which can catch the error and thus can prevent the abnormal
termination of the program.
Thanks and hope for the better answer.
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sirisha
Error is the one which can not be guessed or controlled.
Errors occur during the run time. Once the error occurs, the
program will be terminated automatically.
Exceptions are the ones which can be expected before hand
and can be handled in the program. Hence, even the exception
occurs, it will be handled, and the process will be
continued without any termination.
Is This Answer Correct ? | 2 Yes | 1 No |
How can we access the correction and transport system? : abap data dictionary
How do you find out who has transported a transport request?
please any one can tell me How to validate the data in Table maintinance generator?how can u validate the table field values if u r entering the data into fields .it shows record is wrong?wher we can done validation in table maitenance generator before getting the data as out ?
I have 2 fields like customer and name having 20 records on basic list. When I select 5 records randomly, I want to get the address of particular customer selected in secondary list?
why particularly lock object name starts with EZ OR EY?
how many types of interfaces are there in abap ?
Explain the different types of mode (run code) in call transaction method?
field symbol work as a pointer,but it store address of value.my question is ,it got address from sap memory or abap memory or in database server ? i mean that address indicate to which memory ?
1 Answers Infosys, Tata Technologies, TCS,
What is a data class?
How do you write transaction programs in sap?
what is the transaction code to create LOGO in sap scripts?
How many types of tables exists and what are they in data dictionary? : abap data dictionary