Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 632 Bytes

exceptions.md

File metadata and controls

47 lines (39 loc) · 632 Bytes

Try_Catch_Exception_Finally_Close

Try
 Something()
CATCH exception
 HandleException(exception)
Finally
 PrintLog()

javascript

 try {
  //do something
 } catch(error){
  //handle error
 } finally{
   //apply default action
 }
 

csharp

 try {
  //do something
 } catch(Exception ex){
  //handle error
 } finally {
   //apply default action
 }

python

x,y = 3,2
try: 
    # Floor Division : Gives only Fractional Part as Answer 
    result = x // y 
    print("Yeah ! Your answer is :", result) 
except ZeroDivisionError: 
    print("Sorry ! You are dividing by zero ")