Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference between an Exception and an Error

Former Member
0 Likes
1,477

Hi,

Could anybody tell me the precise difference between an Exception and an Error with example . .

Thanks and regards

--Deepti

4 REPLIES 4
Read only

FredericGirod
Active Contributor
0 Likes
1,010

Hi Deepti,

exception is a very high level of error, exception will close the current program/transaction with a long message.

an error will only stop the action of the user, the data is not lost.

Rgd

Frédéric

Read only

Former Member
0 Likes
1,010

Hi Deepti,

When errors occurs program terminates

abruptly,In order to avoid this we catch this

error as exception.

Ex

when we divide 1 / 0 we get divide error and

program terminates , But we can can avoid this but

raising exception like

when 'Divide error'

message 'Divide Error'.

Regards

Amole

Read only

Former Member
0 Likes
1,010

Hi,

Exceptions...we can raise or cath them and handle....

Errors...will be occured automatically.....

Other way is if an error occured...we can rise an exception and handle.......

ex: if a<> 0.

c=b/a.

else.

raise arthemetic_excp.

endif.

We can handle this arthemetic_excp exception ....for ex we can display a msg that..."div by zero not possible".

Sreedhar

Read only

Former Member
0 Likes
1,010

Hi Deepti,

Refer this link to learn more about errors and exceptions.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f86c9290-0201-0010-7a93-dda">Exception Handling Concept in ABAP</a>

Regards,

Raj