You need to sign in to do that
Don't have an account?
Ross.ax1563
Error Method for Entire Class
Goodday
Is it possible to define an error method for an entire Apex class?
Many thanks
Ross
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Goodday
Is it possible to define an error method for an entire Apex class?
Many thanks
Ross
http://infallibletechie.blogspot.in/2012/10/how-to-display-error-messages-in.html
Check this...
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
SFDC Site
If this post is your solution, kindly mark this as the solution and give Kudos.
I am not completely clear what you are trying to do.
You could potentially have a method which takes "Error Message" as input, and invokes the following method
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error Message.');
It may also have a System.Debug message to print the error.
Every where in the code (controller) we can then call this method to print messages, instead of calling ApexPages.Message.
No, I am basically trying to catch the entire class and pass the exception to a method liek this (pseudocode):-
try {
theclass
}
catch (exception E){
myerrorhandler(E);
}