In this post, we will see Exception Handling in Apex Part 2 | Try, Catch, Finally Block.
Program Code:
System.debug('Before Exception');
try{
Double result=10/2;
}
catch(NullPointerException e){
System.debug(e);
}
catch(MathException e){
System.debug(e);
}
catch(Exception e){
System.debug(e);
}
finally{
System.debug('In Finally Block');
}
System.debug('After Exception');
No comments:
Post a Comment