You need to sign in to do that
Don't have an account?
111
how can i direct throw the errors?
how can i direct throw the errors?
for example
i got the error
unexpected token: throw |
global class HelloWorld3 {
WebService static String sayHelloWorld(String userID, String userName) throw Exception{
Account c = [select account.name from account where name =:userName];
}
Inside the method, when you want to throw an exception, that's when you use "throw" with no S.
thank you for your replay
i also got the errors
why?
global class HelloWorld3 {
WebService static String sayHelloWorld(String userID, String userName) throws Exception{
Account c = [select account.name from account where name =:userName];
c.name = 'Roth';update c;return 'Hello';}
}