You need to sign in to do that
Don't have an account?
Steven Houghtalen
Need help with exception handling - catch statement
I get a compile error with the following code and can't figure out how to resolve. Could use some help...thank you.
public class testexcept{
string a = 'temp';
string b = 'test';
public static void jamen(){
// main code here
}
catch (Exception e) {
// Process exception here/
}
}
public class testexcept{
string a = 'temp';
string b = 'test';
public static void jamen(){
// main code here
}
catch (Exception e) {
// Process exception here/
}
}
Steve
All Answers
I believe the error is being thrown because of the absence of 'try' block. A try and catch block comes in pair.
Try the following code ...
Read more about exception handling here (https://developer.salesforce.com/page/An_Introduction_to_Exception_Handling)
Steve
Please mark my solution as Best Solution to Mark it Solved !!
Best,
Nithesh