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 many ways to debug the script and can we debug the smartform if yes how can we debug
i need the explanation for the following one . 1.BAPI 2.BADI 3.USEREXITS. 4.ALE,IDOCS,REPORT,SAPSCRIPTS,SMARTFORMS. And their uses,what is it process in realtime.
What are the buffering options in abap?
what objects can be generated by the batch input recorder?
What are the basic object types? : sap abap hr
can anyone tell me how to code bdc program with 2 or 3 conditions in g/l account master(fi/co) how to make logic in choosing radio button automaticaly (for balance sheet and profit loss accout in our case.)
What are the different types of work process?
What table stores online messages?
is there any tping conversions in abp.and list them
What are Standard Texts?
How many types of size categories and data classes are there?
what is the model dialog box?
1 Answers Bristle Cone, Cap Gemini, HP, Satyam, Wipro,