cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Error n Exception

senthil_kumar29
Participant
0 Kudos

Hi,

I find in the messager manager Interface, methods like report_error_message and Report_Exception. What could be the difference between these methods.

Thank U for Ur time.

Cheers,

Sam

Accepted Solutions (0)

Answers (3)

Answers (3)

senthil_kumar29
Participant
0 Kudos

Thanx for the clarification.

Cheers,

Sam

Former Member
0 Kudos

hi programming point of View speaking Difference in Error and Exeception .

Exception .

Some condition occurs in your program that is let say exception to what input you expect then you can throw an exception saying that and end of program you will catch it.

just take case if have integer data and user enter float value then you will raise such exception that float_enter() you will catch it and will show corr. message .Its nothing but doing programming by keeping in mind various exeception condition which can occurs during runtime.

Error

it is proper mistake done by programmer while writing code that causes code not to run or some thing like this .It is something not supported by compiler so it show error .

Now in context of SAP both FM do funtionally speaking above roles said,.

Cheers

Parry

Former Member
0 Kudos

Hi,

The functional diiference, in terms of the compiler, is that you don't have to declare errors in <b>throw</b> clauses on methods, or<b> catch</b> them.

Conceptually, an <b>Error means something has gone wrong with the program</b>, which should usually give up and crash, whereas an <b>exception is for an unusual situation</b> that you, as a programmer, anticipated as a possibilty.

So, for example, a divide-by-zero is an Error, but attempting to read a file and finding it doesn't exist is an Exception.

Hope this clears your doubt.

Do reward points if useful.

Regards,

Nayana